public class io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl implements io.vertx.ext.auth.htdigest.HtdigestAuth
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl
super_class: java.lang.Object
{
private static final java.security.MessageDigest MD5;
descriptor: Ljava/security/MessageDigest;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.util.Map<java.lang.String, io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl$Digest> htdigest;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/String;Lio/vertx/ext/auth/htdigest/impl/HtdigestAuthImpl$Digest;>;
private final java.lang.String realm;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private static final char[] hexArray;
descriptor: [C
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=1, args_size=0
0: ldc "MD5"
invokestatic java.security.MessageDigest.getInstance:(Ljava/lang/String;)Ljava/security/MessageDigest;
putstatic io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.MD5:Ljava/security/MessageDigest;
1: goto 4
StackMap locals:
StackMap stack: java.security.NoSuchAlgorithmException
2: astore 0
start local 0 3: new java.lang.RuntimeException
dup
aload 0
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 0 4: StackMap locals:
StackMap stack:
ldc "0123456789abcdef"
invokevirtual java.lang.String.toCharArray:()[C
putstatic io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.hexArray:[C
return
LocalVariableTable:
Start End Slot Name Signature
3 4 0 e Ljava/security/NoSuchAlgorithmException;
Exception table:
from to target type
0 1 2 Class java.security.NoSuchAlgorithmException
public void <init>(io.vertx.core.Vertx, java.lang.String);
descriptor: (Lio/vertx/core/Vertx;Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=8, locals=9, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putfield io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.htdigest:Ljava/util/Map;
2: aconst_null
astore 3
start local 3 3: aload 1
invokeinterface io.vertx.core.Vertx.fileSystem:()Lio/vertx/core/file/FileSystem;
aload 2
invokeinterface io.vertx.core.file.FileSystem.readFileBlocking:(Ljava/lang/String;)Lio/vertx/core/buffer/Buffer;
invokeinterface io.vertx.core.buffer.Buffer.toString:()Ljava/lang/String;
ldc "\\r?\\n"
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
dup
astore 7
arraylength
istore 6
iconst_0
istore 5
goto 13
StackMap locals: io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl io.vertx.core.Vertx java.lang.String java.lang.String top int int java.lang.String[]
StackMap stack:
4: aload 7
iload 5
aaload
astore 4
start local 4 5: aload 4
ldc ":"
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
astore 8
start local 8 6: aload 3
ifnonnull 9
7: aload 8
iconst_1
aaload
astore 3
8: goto 11
9: StackMap locals: io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl io.vertx.core.Vertx java.lang.String java.lang.String java.lang.String int int java.lang.String[] java.lang.String[]
StackMap stack:
aload 3
aload 8
iconst_1
aaload
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 11
10: new java.lang.RuntimeException
dup
ldc "multiple realms in htdigest file not allowed."
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;)V
athrow
11: StackMap locals:
StackMap stack:
aload 0
getfield io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.htdigest:Ljava/util/Map;
aload 8
iconst_0
aaload
new io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl$Digest
dup
aload 8
iconst_0
aaload
aload 8
iconst_1
aaload
aload 8
iconst_2
aaload
invokespecial io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl$Digest.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 8 end local 4 12: iinc 5 1
StackMap locals: io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl io.vertx.core.Vertx java.lang.String java.lang.String top int int java.lang.String[]
StackMap stack:
13: iload 5
iload 6
if_icmplt 4
14: aload 0
aload 3
putfield io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.realm:Ljava/lang/String;
15: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lio/vertx/ext/auth/htdigest/impl/HtdigestAuthImpl;
0 16 1 vertx Lio/vertx/core/Vertx;
0 16 2 htdigestFile Ljava/lang/String;
3 16 3 realm Ljava/lang/String;
5 12 4 line Ljava/lang/String;
6 12 8 parts [Ljava/lang/String;
MethodParameters:
Name Flags
vertx
htdigestFile
public java.lang.String realm();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.realm:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/vertx/ext/auth/htdigest/impl/HtdigestAuthImpl;
public void authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.auth.User>>);
descriptor: (Lio/vertx/core/json/JsonObject;Lio/vertx/core/Handler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=9, args_size=3
start local 0 start local 1 start local 2 0: aload 1
ldc "username"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)Ljava/lang/String;
astore 3
start local 3 1: aload 3
ifnull 2
aload 3
invokevirtual java.lang.String.length:()I
ifne 4
2: StackMap locals: java.lang.String
StackMap stack:
aload 2
ldc "Username must be set for authentication."
invokestatic io.vertx.core.Future.failedFuture:(Ljava/lang/String;)Lio/vertx/core/Future;
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
3: return
4: StackMap locals:
StackMap stack:
aload 0
getfield io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.htdigest:Ljava/util/Map;
aload 3
invokeinterface java.util.Map.containsKey:(Ljava/lang/Object;)Z
ifne 7
5: aload 2
ldc "Unknown username."
invokestatic io.vertx.core.Future.failedFuture:(Ljava/lang/String;)Lio/vertx/core/Future;
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
6: return
7: StackMap locals:
StackMap stack:
aload 1
ldc "realm"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)Ljava/lang/String;
astore 4
start local 4 8: aload 4
ifnonnull 11
9: aload 2
ldc "Realm must be set for authentication."
invokestatic io.vertx.core.Future.failedFuture:(Ljava/lang/String;)Lio/vertx/core/Future;
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
10: return
11: StackMap locals: java.lang.String
StackMap stack:
aload 0
getfield io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.htdigest:Ljava/util/Map;
aload 3
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl$Digest
astore 5
start local 5 12: aload 5
getfield io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl$Digest.realm:Ljava/lang/String;
aload 4
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 15
13: aload 2
ldc "Invalid realm."
invokestatic io.vertx.core.Future.failedFuture:(Ljava/lang/String;)Lio/vertx/core/Future;
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
14: return
15: StackMap locals: io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl$Digest
StackMap stack:
ldc "MD5-sess"
aload 1
ldc "algorithm"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 18
16: new java.lang.StringBuilder
dup
aload 5
getfield io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl$Digest.password:Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ":"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
ldc "nonce"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)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;
aload 1
ldc "cnonce"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.md5:(Ljava/lang/String;)Ljava/lang/String;
astore 6
start local 6 17: goto 19
end local 6 18: StackMap locals:
StackMap stack:
aload 5
getfield io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl$Digest.password:Ljava/lang/String;
astore 6
start local 6 19: StackMap locals: java.lang.String
StackMap stack:
aload 1
ldc "qop"
invokevirtual io.vertx.core.json.JsonObject.containsKey:(Ljava/lang/String;)Z
ifeq 20
ldc "auth"
aload 1
ldc "qop"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 22
20: StackMap locals:
StackMap stack:
new java.lang.StringBuilder
dup
aload 1
ldc "method"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ":"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
ldc "uri"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.md5:(Ljava/lang/String;)Ljava/lang/String;
astore 7
start local 7 21: goto 27
end local 7 StackMap locals:
StackMap stack:
22: ldc "auth-int"
aload 1
ldc "qop"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 25
23: aload 2
ldc "qop: auth-int not supported."
invokestatic io.vertx.core.Future.failedFuture:(Ljava/lang/String;)Lio/vertx/core/Future;
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
24: return
25: StackMap locals:
StackMap stack:
aload 2
ldc "Invalid qop."
invokestatic io.vertx.core.Future.failedFuture:(Ljava/lang/String;)Lio/vertx/core/Future;
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
26: return
start local 7 27: StackMap locals: java.lang.String
StackMap stack:
aload 1
ldc "qop"
invokevirtual io.vertx.core.json.JsonObject.containsKey:(Ljava/lang/String;)Z
ifne 30
28: new java.lang.StringBuilder
dup
aload 6
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ":"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
ldc "nonce"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)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;
aload 7
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.md5:(Ljava/lang/String;)Ljava/lang/String;
astore 8
start local 8 29: goto 31
end local 8 30: StackMap locals:
StackMap stack:
new java.lang.StringBuilder
dup
aload 6
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ":"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
ldc "nonce"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)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;
aload 1
ldc "nc"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)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;
aload 1
ldc "cnonce"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)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;
aload 1
ldc "qop"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)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;
aload 7
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.md5:(Ljava/lang/String;)Ljava/lang/String;
astore 8
start local 8 31: StackMap locals: java.lang.String
StackMap stack:
aload 8
aload 1
ldc "response"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 34
32: aload 2
new io.vertx.ext.auth.htdigest.impl.HtdigestUser
dup
aload 5
getfield io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl$Digest.username:Ljava/lang/String;
aload 5
getfield io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl$Digest.realm:Ljava/lang/String;
invokespecial io.vertx.ext.auth.htdigest.impl.HtdigestUser.<init>:(Ljava/lang/String;Ljava/lang/String;)V
invokestatic io.vertx.core.Future.succeededFuture:(Ljava/lang/Object;)Lio/vertx/core/Future;
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
33: goto 35
34: StackMap locals:
StackMap stack:
aload 2
ldc "Bad response"
invokestatic io.vertx.core.Future.failedFuture:(Ljava/lang/String;)Lio/vertx/core/Future;
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
35: StackMap locals:
StackMap stack:
return
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 36 0 this Lio/vertx/ext/auth/htdigest/impl/HtdigestAuthImpl;
0 36 1 authInfo Lio/vertx/core/json/JsonObject;
0 36 2 resultHandler Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/vertx/ext/auth/User;>;>;
1 36 3 username Ljava/lang/String;
8 36 4 realm Ljava/lang/String;
12 36 5 credential Lio/vertx/ext/auth/htdigest/impl/HtdigestAuthImpl$Digest;
17 18 6 ha1 Ljava/lang/String;
19 36 6 ha1 Ljava/lang/String;
21 22 7 ha2 Ljava/lang/String;
27 36 7 ha2 Ljava/lang/String;
29 30 8 digest Ljava/lang/String;
31 36 8 digest Ljava/lang/String;
Signature: (Lio/vertx/core/json/JsonObject;Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/vertx/ext/auth/User;>;>;)V
MethodParameters:
Name Flags
authInfo
resultHandler
private static java.lang.String bytesToHex(byte[]);
descriptor: ([B)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: aload 0
arraylength
iconst_2
imul
newarray 5
astore 1
start local 1 1: iconst_0
istore 2
start local 2 2: goto 7
3: StackMap locals: char[] int
StackMap stack:
aload 0
iload 2
baload
sipush 255
iand
istore 3
start local 3 4: aload 1
iload 2
iconst_2
imul
getstatic io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.hexArray:[C
iload 3
iconst_4
iushr
caload
castore
5: aload 1
iload 2
iconst_2
imul
iconst_1
iadd
getstatic io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.hexArray:[C
iload 3
bipush 15
iand
caload
castore
end local 3 6: iinc 2 1
StackMap locals:
StackMap stack:
7: iload 2
aload 0
arraylength
if_icmplt 3
end local 2 8: new java.lang.String
dup
aload 1
invokespecial java.lang.String.<init>:([C)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 bytes [B
1 9 1 hexChars [C
2 8 2 j I
4 6 3 v I
MethodParameters:
Name Flags
bytes
private static synchronized java.lang.String md5(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x002a) ACC_PRIVATE, ACC_STATIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=1
start local 0 0: getstatic io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.MD5:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.reset:()V
1: getstatic io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.MD5:Ljava/security/MessageDigest;
aload 0
invokevirtual java.lang.String.getBytes:()[B
invokevirtual java.security.MessageDigest.digest:([B)[B
invokestatic io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl.bytesToHex:([B)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 payload Ljava/lang/String;
MethodParameters:
Name Flags
payload
}
SourceFile: "HtdigestAuthImpl.java"
NestMembers:
io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl$Digest
InnerClasses:
private Digest = io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl$Digest of io.vertx.ext.auth.htdigest.impl.HtdigestAuthImpl