360 lines
8.8 KiB
Smali
360 lines
8.8 KiB
Smali
.class public Lcz/msebera/android/httpclient/impl/auth/b;
|
|
.super Lcz/msebera/android/httpclient/impl/auth/l;
|
|
.source "BasicScheme.java"
|
|
|
|
|
|
# annotations
|
|
.annotation build Lcz/msebera/android/httpclient/annotation/NotThreadSafe;
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public d:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 4
|
|
sget-object v0, Ldf/b;->f:Ljava/nio/charset/Charset;
|
|
|
|
invoke-direct {p0, v0}, Lcz/msebera/android/httpclient/impl/auth/b;-><init>(Ljava/nio/charset/Charset;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcz/msebera/android/httpclient/auth/ChallengeState;)V
|
|
.locals 0
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
.line 3
|
|
invoke-direct {p0, p1}, Lcz/msebera/android/httpclient/impl/auth/l;-><init>(Lcz/msebera/android/httpclient/auth/ChallengeState;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/nio/charset/Charset;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1}, Lcz/msebera/android/httpclient/impl/auth/l;-><init>(Ljava/nio/charset/Charset;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 2
|
|
iput-boolean p1, p0, Lcz/msebera/android/httpclient/impl/auth/b;->d:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static j(Lef/j;Ljava/lang/String;Z)Ldf/d;
|
|
.locals 2
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
const-string v0, "Credentials"
|
|
|
|
.line 1
|
|
invoke-static {p0, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
const-string v0, "charset"
|
|
|
|
.line 2
|
|
invoke-static {p1, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
.line 3
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
.line 4
|
|
invoke-interface {p0}, Lef/j;->getUserPrincipal()Ljava/security/Principal;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/security/Principal;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ":"
|
|
|
|
.line 5
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 6
|
|
invoke-interface {p0}, Lef/j;->getPassword()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const-string p0, "null"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-interface {p0}, Lef/j;->getPassword()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 7
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0, p1}, Lqg/d;->d(Ljava/lang/String;Ljava/lang/String;)[B
|
|
|
|
move-result-object p0
|
|
|
|
const/4 p1, 0x2
|
|
|
|
.line 8
|
|
invoke-static {p0, p1}, Lcz/msebera/android/httpclient/extras/a;->d([BI)[B
|
|
|
|
move-result-object p0
|
|
|
|
.line 9
|
|
new-instance p1, Lcz/msebera/android/httpclient/util/CharArrayBuffer;
|
|
|
|
const/16 v0, 0x20
|
|
|
|
invoke-direct {p1, v0}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;-><init>(I)V
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
const-string p2, "Proxy-Authorization"
|
|
|
|
.line 10
|
|
invoke-virtual {p1, p2}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const-string p2, "Authorization"
|
|
|
|
.line 11
|
|
invoke-virtual {p1, p2}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
:goto_1
|
|
const-string p2, ": Basic "
|
|
|
|
.line 12
|
|
invoke-virtual {p1, p2}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
const/4 p2, 0x0
|
|
|
|
.line 13
|
|
array-length v0, p0
|
|
|
|
invoke-virtual {p1, p0, p2, v0}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->append([BII)V
|
|
|
|
.line 14
|
|
new-instance p0, Lcz/msebera/android/httpclient/message/BufferedHeader;
|
|
|
|
invoke-direct {p0, p1}, Lcz/msebera/android/httpclient/message/BufferedHeader;-><init>(Lcz/msebera/android/httpclient/util/CharArrayBuffer;)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Ldf/d;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcz/msebera/android/httpclient/auth/MalformedChallengeException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-super {p0, p1}, Lcz/msebera/android/httpclient/impl/auth/a;->a(Ldf/d;)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 2
|
|
iput-boolean p1, p0, Lcz/msebera/android/httpclient/impl/auth/b;->d:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public b(Lef/j;Ldf/q;)Ldf/d;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcz/msebera/android/httpclient/auth/AuthenticationException;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance v0, Lpg/a;
|
|
|
|
invoke-direct {v0}, Lpg/a;-><init>()V
|
|
|
|
invoke-virtual {p0, p1, p2, v0}, Lcz/msebera/android/httpclient/impl/auth/b;->c(Lef/j;Ldf/q;Lpg/g;)Ldf/d;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public c(Lef/j;Ldf/q;Lpg/g;)Ldf/d;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcz/msebera/android/httpclient/auth/AuthenticationException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string p3, "Credentials"
|
|
|
|
.line 1
|
|
invoke-static {p1, p3}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
const-string p3, "HTTP request"
|
|
|
|
.line 2
|
|
invoke-static {p2, p3}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
.line 3
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
.line 4
|
|
invoke-interface {p1}, Lef/j;->getUserPrincipal()Ljava/security/Principal;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/security/Principal;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, ":"
|
|
|
|
.line 5
|
|
invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 6
|
|
invoke-interface {p1}, Lef/j;->getPassword()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string p1, "null"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-interface {p1}, Lef/j;->getPassword()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 7
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p2}, Lcz/msebera/android/httpclient/impl/auth/l;->g(Ldf/q;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p1, p2}, Lqg/d;->d(Ljava/lang/String;Ljava/lang/String;)[B
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x2
|
|
|
|
.line 8
|
|
invoke-static {p1, p2}, Lcz/msebera/android/httpclient/extras/a;->d([BI)[B
|
|
|
|
move-result-object p1
|
|
|
|
.line 9
|
|
new-instance p2, Lcz/msebera/android/httpclient/util/CharArrayBuffer;
|
|
|
|
const/16 p3, 0x20
|
|
|
|
invoke-direct {p2, p3}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;-><init>(I)V
|
|
|
|
.line 10
|
|
invoke-virtual {p0}, Lcz/msebera/android/httpclient/impl/auth/a;->e()Z
|
|
|
|
move-result p3
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
const-string p3, "Proxy-Authorization"
|
|
|
|
.line 11
|
|
invoke-virtual {p2, p3}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const-string p3, "Authorization"
|
|
|
|
.line 12
|
|
invoke-virtual {p2, p3}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
:goto_1
|
|
const-string p3, ": Basic "
|
|
|
|
.line 13
|
|
invoke-virtual {p2, p3}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
const/4 p3, 0x0
|
|
|
|
.line 14
|
|
array-length v0, p1
|
|
|
|
invoke-virtual {p2, p1, p3, v0}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->append([BII)V
|
|
|
|
.line 15
|
|
new-instance p1, Lcz/msebera/android/httpclient/message/BufferedHeader;
|
|
|
|
invoke-direct {p1, p2}, Lcz/msebera/android/httpclient/message/BufferedHeader;-><init>(Lcz/msebera/android/httpclient/util/CharArrayBuffer;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public getSchemeName()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "basic"
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public isComplete()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lcz/msebera/android/httpclient/impl/auth/b;->d:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isConnectionBased()Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|