public class io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl implements io.vertx.ext.auth.htpasswd.HtpasswdAuth
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl
super_class: java.lang.Object
{
private final io.vertx.ext.auth.HashingStrategy strategy;
descriptor: Lio/vertx/ext/auth/HashingStrategy;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.Map<java.lang.String, java.lang.String> htUsers;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
public void <init>(io.vertx.core.Vertx, io.vertx.ext.auth.htpasswd.HtpasswdAuthOptions);
descriptor: (Lio/vertx/core/Vertx;Lio/vertx/ext/auth/htpasswd/HtpasswdAuthOptions;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, 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
invokestatic io.vertx.ext.auth.HashingStrategy.load:()Lio/vertx/ext/auth/HashingStrategy;
putfield io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl.strategy:Lio/vertx/ext/auth/HashingStrategy;
2: aload 0
new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putfield io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl.htUsers:Ljava/util/Map;
3: aload 1
invokeinterface io.vertx.core.Vertx.fileSystem:()Lio/vertx/core/file/FileSystem;
aload 2
invokevirtual io.vertx.ext.auth.htpasswd.HtpasswdAuthOptions.getHtpasswdFile:()Ljava/lang/String;
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 6
arraylength
istore 5
iconst_0
istore 4
goto 12
StackMap locals: io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl io.vertx.core.Vertx io.vertx.ext.auth.htpasswd.HtpasswdAuthOptions top int int java.lang.String[]
StackMap stack:
4: aload 6
iload 4
aaload
astore 3
start local 3 5: aload 3
invokevirtual java.lang.String.trim:()Ljava/lang/String;
astore 3
6: aload 3
invokevirtual java.lang.String.isEmpty:()Z
ifne 11
aload 3
ldc "#"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 7
goto 11
7: StackMap locals: io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl io.vertx.core.Vertx io.vertx.ext.auth.htpasswd.HtpasswdAuthOptions java.lang.String int int java.lang.String[]
StackMap stack:
ldc "^([^:]+):(.+)"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
astore 7
start local 7 8: aload 7
aload 3
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
astore 8
start local 8 9: aload 8
invokevirtual java.util.regex.Matcher.matches:()Z
ifeq 11
10: aload 0
getfield io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl.htUsers:Ljava/util/Map;
aload 8
iconst_1
invokevirtual java.util.regex.Matcher.group:(I)Ljava/lang/String;
aload 8
iconst_2
invokevirtual java.util.regex.Matcher.group:(I)Ljava/lang/String;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 8 end local 7 end local 3 11: StackMap locals: io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl io.vertx.core.Vertx io.vertx.ext.auth.htpasswd.HtpasswdAuthOptions top int int java.lang.String[]
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
12: iload 4
iload 5
if_icmplt 4
13: aload 2
invokevirtual io.vertx.ext.auth.htpasswd.HtpasswdAuthOptions.isPlainTextEnabled:()Z
ifeq 15
14: aload 0
getfield io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl.strategy:Lio/vertx/ext/auth/HashingStrategy;
ldc ""
new io.vertx.ext.auth.htpasswd.impl.hash.Plaintext
dup
invokespecial io.vertx.ext.auth.htpasswd.impl.hash.Plaintext.<init>:()V
invokeinterface io.vertx.ext.auth.HashingStrategy.put:(Ljava/lang/String;Lio/vertx/ext/auth/HashingAlgorithm;)Lio/vertx/ext/auth/HashingStrategy;
pop
15: StackMap locals: io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl io.vertx.core.Vertx io.vertx.ext.auth.htpasswd.HtpasswdAuthOptions
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lio/vertx/ext/auth/htpasswd/impl/HtpasswdAuthImpl;
0 16 1 vertx Lio/vertx/core/Vertx;
0 16 2 options Lio/vertx/ext/auth/htpasswd/HtpasswdAuthOptions;
5 11 3 line Ljava/lang/String;
8 11 7 entry Ljava/util/regex/Pattern;
9 11 8 m Ljava/util/regex/Matcher;
MethodParameters:
Name Flags
vertx
options
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=4, locals=5, 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 1
ldc "password"
invokevirtual io.vertx.core.json.JsonObject.getString:(Ljava/lang/String;)Ljava/lang/String;
astore 4
start local 4 2: aload 3
ifnull 3
aload 3
invokevirtual java.lang.String.length:()I
ifne 5
3: StackMap locals: java.lang.String 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
4: return
5: StackMap locals:
StackMap stack:
aload 0
getfield io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl.htUsers:Ljava/util/Map;
aload 3
invokeinterface java.util.Map.containsKey:(Ljava/lang/Object;)Z
ifne 8
6: 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
7: return
8: StackMap locals:
StackMap stack:
aload 0
getfield io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl.strategy:Lio/vertx/ext/auth/HashingStrategy;
aload 0
getfield io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl.htUsers:Ljava/util/Map;
aload 3
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
aload 4
invokeinterface io.vertx.ext.auth.HashingStrategy.verify:(Ljava/lang/String;Ljava/lang/String;)Z
ifeq 11
9: aload 2
new io.vertx.ext.auth.htpasswd.impl.HtpasswdUser
dup
aload 3
invokespecial io.vertx.ext.auth.htpasswd.impl.HtpasswdUser.<init>:(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
10: goto 12
11: 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
12: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lio/vertx/ext/auth/htpasswd/impl/HtpasswdAuthImpl;
0 13 1 authInfo Lio/vertx/core/json/JsonObject;
0 13 2 resultHandler Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/vertx/ext/auth/User;>;>;
1 13 3 username Ljava/lang/String;
2 13 4 password 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
}
SourceFile: "HtpasswdAuthImpl.java"