public abstract class com.sun.net.httpserver.BasicAuthenticator extends com.sun.net.httpserver.Authenticator
minor version: 0
major version: 59
flags: flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
this_class: com.sun.net.httpserver.BasicAuthenticator
super_class: com.sun.net.httpserver.Authenticator
{
protected java.lang.String realm;
descriptor: Ljava/lang/String;
flags: (0x0004) ACC_PROTECTED
public void <init>(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial com.sun.net.httpserver.Authenticator.<init>:()V
1: aload 0
aload 1
putfield com.sun.net.httpserver.BasicAuthenticator.realm:Ljava/lang/String;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/sun/net/httpserver/BasicAuthenticator;
0 3 1 realm Ljava/lang/String;
MethodParameters:
Name Flags
realm
public java.lang.String getRealm();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.net.httpserver.BasicAuthenticator.realm:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/sun/net/httpserver/BasicAuthenticator;
public com.sun.net.httpserver.Authenticator$Result authenticate(com.sun.net.httpserver.HttpExchange);
descriptor: (Lcom/sun/net/httpserver/HttpExchange;)Lcom/sun/net/httpserver/Authenticator$Result;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=11, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual com.sun.net.httpserver.HttpExchange.getRequestHeaders:()Lcom/sun/net/httpserver/Headers;
astore 2
start local 2 1: aload 2
ldc "Authorization"
invokevirtual com.sun.net.httpserver.Headers.getFirst:(Ljava/lang/String;)Ljava/lang/String;
astore 3
start local 3 2: aload 3
ifnonnull 6
3: aload 1
invokevirtual com.sun.net.httpserver.HttpExchange.getResponseHeaders:()Lcom/sun/net/httpserver/Headers;
astore 4
start local 4 4: aload 4
ldc "WWW-Authenticate"
new java.lang.StringBuilder
dup
ldc "Basic realm=\""
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield com.sun.net.httpserver.BasicAuthenticator.realm:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "\""
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual com.sun.net.httpserver.Headers.set:(Ljava/lang/String;Ljava/lang/String;)V
5: new com.sun.net.httpserver.Authenticator$Retry
dup
sipush 401
invokespecial com.sun.net.httpserver.Authenticator$Retry.<init>:(I)V
areturn
end local 4 6: StackMap locals: com.sun.net.httpserver.Headers java.lang.String
StackMap stack:
aload 3
bipush 32
invokevirtual java.lang.String.indexOf:(I)I
istore 4
start local 4 7: iload 4
iconst_m1
if_icmpeq 8
aload 3
iconst_0
iload 4
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
ldc "Basic"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 9
8: StackMap locals: int
StackMap stack:
new com.sun.net.httpserver.Authenticator$Failure
dup
sipush 401
invokespecial com.sun.net.httpserver.Authenticator$Failure.<init>:(I)V
areturn
9: StackMap locals:
StackMap stack:
aload 3
iload 4
iconst_1
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
invokestatic com.sun.net.httpserver.Base64.base64ToByteArray:(Ljava/lang/String;)[B
astore 5
start local 5 10: new java.lang.String
dup
aload 5
invokespecial java.lang.String.<init>:([B)V
astore 6
start local 6 11: aload 6
bipush 58
invokevirtual java.lang.String.indexOf:(I)I
istore 7
start local 7 12: aload 6
iconst_0
iload 7
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 8
start local 8 13: aload 6
iload 7
iconst_1
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
astore 9
start local 9 14: aload 0
aload 8
aload 9
invokevirtual com.sun.net.httpserver.BasicAuthenticator.checkCredentials:(Ljava/lang/String;Ljava/lang/String;)Z
ifeq 20
15: new com.sun.net.httpserver.Authenticator$Success
dup
16: new com.sun.net.httpserver.HttpPrincipal
dup
17: aload 8
aload 0
getfield com.sun.net.httpserver.BasicAuthenticator.realm:Ljava/lang/String;
18: invokespecial com.sun.net.httpserver.HttpPrincipal.<init>:(Ljava/lang/String;Ljava/lang/String;)V
19: invokespecial com.sun.net.httpserver.Authenticator$Success.<init>:(Lcom/sun/net/httpserver/HttpPrincipal;)V
areturn
20: StackMap locals: com.sun.net.httpserver.BasicAuthenticator com.sun.net.httpserver.HttpExchange com.sun.net.httpserver.Headers java.lang.String int byte[] java.lang.String int java.lang.String java.lang.String
StackMap stack:
aload 1
invokevirtual com.sun.net.httpserver.HttpExchange.getResponseHeaders:()Lcom/sun/net/httpserver/Headers;
astore 10
start local 10 21: aload 10
ldc "WWW-Authenticate"
new java.lang.StringBuilder
dup
ldc "Basic realm=\""
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield com.sun.net.httpserver.BasicAuthenticator.realm:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "\""
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual com.sun.net.httpserver.Headers.set:(Ljava/lang/String;Ljava/lang/String;)V
22: new com.sun.net.httpserver.Authenticator$Failure
dup
sipush 401
invokespecial com.sun.net.httpserver.Authenticator$Failure.<init>:(I)V
areturn
end local 10 end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 23 0 this Lcom/sun/net/httpserver/BasicAuthenticator;
0 23 1 t Lcom/sun/net/httpserver/HttpExchange;
1 23 2 rmap Lcom/sun/net/httpserver/Headers;
2 23 3 auth Ljava/lang/String;
4 6 4 map Lcom/sun/net/httpserver/Headers;
7 23 4 sp I
10 23 5 b [B
11 23 6 userpass Ljava/lang/String;
12 23 7 colon I
13 23 8 uname Ljava/lang/String;
14 23 9 pass Ljava/lang/String;
21 23 10 map Lcom/sun/net/httpserver/Headers;
MethodParameters:
Name Flags
t
public abstract boolean checkCredentials(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)Z
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
MethodParameters:
Name Flags
username
password
}
SourceFile: "BasicAuthenticator.java"
InnerClasses:
public Failure = com.sun.net.httpserver.Authenticator$Failure of com.sun.net.httpserver.Authenticator
public abstract Result = com.sun.net.httpserver.Authenticator$Result of com.sun.net.httpserver.Authenticator
public Retry = com.sun.net.httpserver.Authenticator$Retry of com.sun.net.httpserver.Authenticator
public Success = com.sun.net.httpserver.Authenticator$Success of com.sun.net.httpserver.Authenticator