330 lines
7.7 KiB
Smali
330 lines
7.7 KiB
Smali
.class public abstract Lcz/msebera/android/httpclient/impl/auth/a;
|
|
.super Ljava/lang/Object;
|
|
.source "AuthSchemeBase.java"
|
|
|
|
# interfaces
|
|
.implements Lef/i;
|
|
|
|
|
|
# annotations
|
|
.annotation build Lcz/msebera/android/httpclient/annotation/NotThreadSafe;
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public a:Lcz/msebera/android/httpclient/auth/ChallengeState;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 3
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()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 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
iput-object p1, p0, Lcz/msebera/android/httpclient/impl/auth/a;->a:Lcz/msebera/android/httpclient/auth/ChallengeState;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Ldf/d;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcz/msebera/android/httpclient/auth/MalformedChallengeException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "Header"
|
|
|
|
.line 1
|
|
invoke-static {p1, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
.line 2
|
|
invoke-interface {p1}, Ldf/d;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "WWW-Authenticate"
|
|
|
|
.line 3
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 4
|
|
sget-object v0, Lcz/msebera/android/httpclient/auth/ChallengeState;->TARGET:Lcz/msebera/android/httpclient/auth/ChallengeState;
|
|
|
|
iput-object v0, p0, Lcz/msebera/android/httpclient/impl/auth/a;->a:Lcz/msebera/android/httpclient/auth/ChallengeState;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v1, "Proxy-Authenticate"
|
|
|
|
.line 5
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
.line 6
|
|
sget-object v0, Lcz/msebera/android/httpclient/auth/ChallengeState;->PROXY:Lcz/msebera/android/httpclient/auth/ChallengeState;
|
|
|
|
iput-object v0, p0, Lcz/msebera/android/httpclient/impl/auth/a;->a:Lcz/msebera/android/httpclient/auth/ChallengeState;
|
|
|
|
.line 7
|
|
:goto_0
|
|
instance-of v0, p1, Ldf/c;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 8
|
|
check-cast p1, Ldf/c;
|
|
|
|
invoke-interface {p1}, Ldf/c;->getBuffer()Lcz/msebera/android/httpclient/util/CharArrayBuffer;
|
|
|
|
move-result-object v0
|
|
|
|
.line 9
|
|
invoke-interface {p1}, Ldf/c;->getValuePos()I
|
|
|
|
move-result p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 10
|
|
:cond_1
|
|
invoke-interface {p1}, Ldf/d;->getValue()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
.line 11
|
|
new-instance v0, Lcz/msebera/android/httpclient/util/CharArrayBuffer;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v0, v1}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;-><init>(I)V
|
|
|
|
.line 12
|
|
invoke-virtual {v0, p1}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->append(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 13
|
|
:goto_1
|
|
invoke-virtual {v0}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->length()I
|
|
|
|
move-result v1
|
|
|
|
if-ge p1, v1, :cond_2
|
|
|
|
invoke-virtual {v0, p1}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->charAt(I)C
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Lpg/f;->a(C)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
move v1, p1
|
|
|
|
.line 14
|
|
:goto_2
|
|
invoke-virtual {v0}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->length()I
|
|
|
|
move-result v2
|
|
|
|
if-ge v1, v2, :cond_3
|
|
|
|
invoke-virtual {v0, v1}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->charAt(I)C
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v2}, Lpg/f;->a(C)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
.line 15
|
|
:cond_3
|
|
invoke-virtual {v0, p1, v1}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 16
|
|
invoke-interface {p0}, Lef/c;->getSchemeName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
.line 17
|
|
invoke-virtual {v0}, Lcz/msebera/android/httpclient/util/CharArrayBuffer;->length()I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, v0, v1, p1}, Lcz/msebera/android/httpclient/impl/auth/a;->f(Lcz/msebera/android/httpclient/util/CharArrayBuffer;II)V
|
|
|
|
return-void
|
|
|
|
.line 18
|
|
:cond_4
|
|
new-instance v0, Lcz/msebera/android/httpclient/auth/MalformedChallengeException;
|
|
|
|
const-string v1, "Invalid scheme identifier: "
|
|
|
|
invoke-static {v1, p1}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Lcz/msebera/android/httpclient/auth/MalformedChallengeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
.line 19
|
|
:cond_5
|
|
new-instance p1, Lcz/msebera/android/httpclient/auth/MalformedChallengeException;
|
|
|
|
const-string v0, "Header value is null"
|
|
|
|
invoke-direct {p1, v0}, Lcz/msebera/android/httpclient/auth/MalformedChallengeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 20
|
|
:cond_6
|
|
new-instance p1, Lcz/msebera/android/httpclient/auth/MalformedChallengeException;
|
|
|
|
const-string v1, "Unexpected header name: "
|
|
|
|
invoke-static {v1, v0}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Lcz/msebera/android/httpclient/auth/MalformedChallengeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public c(Lef/j;Ldf/q;Lpg/g;)Ldf/d;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcz/msebera/android/httpclient/auth/AuthenticationException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-interface {p0, p1, p2}, Lef/c;->b(Lef/j;Ldf/q;)Ldf/d;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public d()Lcz/msebera/android/httpclient/auth/ChallengeState;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcz/msebera/android/httpclient/impl/auth/a;->a:Lcz/msebera/android/httpclient/auth/ChallengeState;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public e()Z
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcz/msebera/android/httpclient/impl/auth/a;->a:Lcz/msebera/android/httpclient/auth/ChallengeState;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
sget-object v1, Lcz/msebera/android/httpclient/auth/ChallengeState;->PROXY:Lcz/msebera/android/httpclient/auth/ChallengeState;
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public abstract f(Lcz/msebera/android/httpclient/util/CharArrayBuffer;II)V
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcz/msebera/android/httpclient/auth/MalformedChallengeException;
|
|
}
|
|
.end annotation
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-interface {p0}, Lef/c;->getSchemeName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
sget-object v1, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->toUpperCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
.line 3
|
|
:cond_0
|
|
invoke-super {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|