.class public Lorg/apache/http/impl/auth/NegotiateScheme; .super Lorg/apache/http/impl/auth/GGSSchemeBase; .source "NegotiateScheme.java" # annotations .annotation runtime Ljava/lang/Deprecated; .end annotation # static fields .field private static final KERBEROS_OID:Ljava/lang/String; = "1.2.840.113554.1.2.2" .field private static final SPNEGO_OID:Ljava/lang/String; = "1.3.6.1.5.5.2" # instance fields .field private final log:Lorg/apache/commons/logging/Log; .field private final spengoGenerator:Lorg/apache/http/impl/auth/SpnegoTokenGenerator; # direct methods .method public constructor ()V .registers 3 const/4 v0, 0x0 const/4 v1, 0x0 .line 74 invoke-direct {p0, v0, v1}, Lorg/apache/http/impl/auth/NegotiateScheme;->(Lorg/apache/http/impl/auth/SpnegoTokenGenerator;Z)V return-void .end method .method public constructor (Lorg/apache/http/impl/auth/SpnegoTokenGenerator;)V .registers 3 const/4 v0, 0x0 .line 70 invoke-direct {p0, p1, v0}, Lorg/apache/http/impl/auth/NegotiateScheme;->(Lorg/apache/http/impl/auth/SpnegoTokenGenerator;Z)V return-void .end method .method public constructor (Lorg/apache/http/impl/auth/SpnegoTokenGenerator;Z)V .registers 3 .line 65 invoke-direct {p0, p2}, Lorg/apache/http/impl/auth/GGSSchemeBase;->(Z)V .line 53 invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object p2 invoke-static {p2}, Lorg/apache/commons/logging/LogFactory;->getLog(Ljava/lang/Class;)Lorg/apache/commons/logging/Log; move-result-object p2 iput-object p2, p0, Lorg/apache/http/impl/auth/NegotiateScheme;->log:Lorg/apache/commons/logging/Log; .line 66 iput-object p1, p0, Lorg/apache/http/impl/auth/NegotiateScheme;->spengoGenerator:Lorg/apache/http/impl/auth/SpnegoTokenGenerator; return-void .end method # virtual methods .method public authenticate(Lorg/apache/http/auth/Credentials;Lorg/apache/http/HttpRequest;)Lorg/apache/http/Header; .registers 4 .annotation system Ldalvik/annotation/Throws; value = { Lorg/apache/http/auth/AuthenticationException; } .end annotation const/4 v0, 0x0 .line 91 invoke-virtual {p0, p1, p2, v0}, Lorg/apache/http/impl/auth/NegotiateScheme;->authenticate(Lorg/apache/http/auth/Credentials;Lorg/apache/http/HttpRequest;Lorg/apache/http/protocol/HttpContext;)Lorg/apache/http/Header; move-result-object p1 return-object p1 .end method .method public authenticate(Lorg/apache/http/auth/Credentials;Lorg/apache/http/HttpRequest;Lorg/apache/http/protocol/HttpContext;)Lorg/apache/http/Header; .registers 4 .annotation system Ldalvik/annotation/Throws; value = { Lorg/apache/http/auth/AuthenticationException; } .end annotation .line 112 invoke-super {p0, p1, p2, p3}, Lorg/apache/http/impl/auth/GGSSchemeBase;->authenticate(Lorg/apache/http/auth/Credentials;Lorg/apache/http/HttpRequest;Lorg/apache/http/protocol/HttpContext;)Lorg/apache/http/Header; move-result-object p1 return-object p1 .end method .method protected generateToken([BLjava/lang/String;)[B .registers 3 .annotation system Ldalvik/annotation/Throws; value = { Lorg/ietf/jgss/GSSException; } .end annotation .line 117 invoke-super {p0, p1, p2}, Lorg/apache/http/impl/auth/GGSSchemeBase;->generateToken([BLjava/lang/String;)[B move-result-object p1 return-object p1 .end method .method protected generateToken([BLjava/lang/String;Lorg/apache/http/auth/Credentials;)[B .registers 7 .annotation system Ldalvik/annotation/Throws; value = { Lorg/ietf/jgss/GSSException; } .end annotation .line 137 new-instance v0, Lorg/ietf/jgss/Oid; const-string v1, "1.3.6.1.5.5.2" invoke-direct {v0, v1}, Lorg/ietf/jgss/Oid;->(Ljava/lang/String;)V .line 142 :try_start_7 invoke-virtual {p0, p1, v0, p2, p3}, Lorg/apache/http/impl/auth/NegotiateScheme;->generateGSSToken([BLorg/ietf/jgss/Oid;Ljava/lang/String;Lorg/apache/http/auth/Credentials;)[B move-result-object p1 :try_end_b .catch Lorg/ietf/jgss/GSSException; {:try_start_7 .. :try_end_b} :catch_d const/4 v0, 0x0 goto :goto_1d :catch_d move-exception v0 .line 146 invoke-virtual {v0}, Lorg/ietf/jgss/GSSException;->getMajor()I move-result v1 const/4 v2, 0x2 if-ne v1, v2, :cond_47 .line 147 iget-object v0, p0, Lorg/apache/http/impl/auth/NegotiateScheme;->log:Lorg/apache/commons/logging/Log; const-string v1, "GSSException BAD_MECH, retry with Kerberos MECH" invoke-interface {v0, v1}, Lorg/apache/commons/logging/Log;->debug(Ljava/lang/Object;)V const/4 v0, 0x1 :goto_1d if-eqz v0, :cond_46 .line 156 iget-object v0, p0, Lorg/apache/http/impl/auth/NegotiateScheme;->log:Lorg/apache/commons/logging/Log; const-string v1, "Using Kerberos MECH 1.2.840.113554.1.2.2" invoke-interface {v0, v1}, Lorg/apache/commons/logging/Log;->debug(Ljava/lang/Object;)V .line 157 new-instance v0, Lorg/ietf/jgss/Oid; const-string v1, "1.2.840.113554.1.2.2" invoke-direct {v0, v1}, Lorg/ietf/jgss/Oid;->(Ljava/lang/String;)V .line 158 invoke-virtual {p0, p1, v0, p2, p3}, Lorg/apache/http/impl/auth/NegotiateScheme;->generateGSSToken([BLorg/ietf/jgss/Oid;Ljava/lang/String;Lorg/apache/http/auth/Credentials;)[B move-result-object p1 if-eqz p1, :cond_46 .line 164 iget-object p2, p0, Lorg/apache/http/impl/auth/NegotiateScheme;->spengoGenerator:Lorg/apache/http/impl/auth/SpnegoTokenGenerator; if-eqz p2, :cond_46 .line 166 :try_start_37 invoke-interface {p2, p1}, Lorg/apache/http/impl/auth/SpnegoTokenGenerator;->generateSpnegoDERObject([B)[B move-result-object p1 :try_end_3b .catch Ljava/io/IOException; {:try_start_37 .. :try_end_3b} :catch_3c goto :goto_46 :catch_3c move-exception p2 .line 168 iget-object p3, p0, Lorg/apache/http/impl/auth/NegotiateScheme;->log:Lorg/apache/commons/logging/Log; invoke-virtual {p2}, Ljava/io/IOException;->getMessage()Ljava/lang/String; move-result-object v0 invoke-interface {p3, v0, p2}, Lorg/apache/commons/logging/Log;->error(Ljava/lang/Object;Ljava/lang/Throwable;)V :cond_46 :goto_46 return-object p1 .line 150 :cond_47 throw v0 .end method .method public getParameter(Ljava/lang/String;)Ljava/lang/String; .registers 3 .line 187 const-string v0, "Parameter name" invoke-static {p1, v0}, Lorg/apache/http/util/Args;->notNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; const/4 p1, 0x0 return-object p1 .end method .method public getRealm()Ljava/lang/String; .registers 2 const/4 v0, 0x0 return-object v0 .end method .method public getSchemeName()Ljava/lang/String; .registers 2 .line 84 const-string v0, "Negotiate" return-object v0 .end method .method public isConnectionBased()Z .registers 2 const/4 v0, 0x1 return v0 .end method