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=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
new io.vertx.ext.auth.authentication.UsernamePasswordCredentials
dup
aload 1
invokespecial io.vertx.ext.auth.authentication.UsernamePasswordCredentials.<init>:(Lio/vertx/core/json/JsonObject;)V
aload 2
invokevirtual io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl.authenticate:(Lio/vertx/ext/auth/authentication/Credentials;Lio/vertx/core/Handler;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/vertx/ext/auth/htpasswd/impl/HtpasswdAuthImpl;
0 2 1 authInfo Lio/vertx/core/json/JsonObject;
0 2 2 resultHandler Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/vertx/ext/auth/User;>;>;
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
public void authenticate(io.vertx.ext.auth.authentication.Credentials, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.auth.User>>);
descriptor: (Lio/vertx/ext/auth/authentication/Credentials;Lio/vertx/core/Handler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
checkcast io.vertx.ext.auth.authentication.UsernamePasswordCredentials
astore 3
start local 3 1: aload 3
aconst_null
invokevirtual io.vertx.ext.auth.authentication.UsernamePasswordCredentials.checkValid:(Ljava/lang/Object;)V
2: aload 0
getfield io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl.htUsers:Ljava/util/Map;
aload 3
invokevirtual io.vertx.ext.auth.authentication.UsernamePasswordCredentials.getUsername:()Ljava/lang/String;
invokeinterface java.util.Map.containsKey:(Ljava/lang/Object;)Z
ifne 5
3: 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
4: return
5: StackMap locals: io.vertx.ext.auth.authentication.UsernamePasswordCredentials
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
invokevirtual io.vertx.ext.auth.authentication.UsernamePasswordCredentials.getUsername:()Ljava/lang/String;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
aload 3
invokevirtual io.vertx.ext.auth.authentication.UsernamePasswordCredentials.getPassword:()Ljava/lang/String;
invokeinterface io.vertx.ext.auth.HashingStrategy.verify:(Ljava/lang/String;Ljava/lang/String;)Z
ifeq 8
6: aload 2
new io.vertx.ext.auth.impl.UserImpl
dup
new io.vertx.core.json.JsonObject
dup
invokespecial io.vertx.core.json.JsonObject.<init>:()V
ldc "username"
aload 3
invokevirtual io.vertx.ext.auth.authentication.UsernamePasswordCredentials.getUsername:()Ljava/lang/String;
invokevirtual io.vertx.core.json.JsonObject.put:(Ljava/lang/String;Ljava/lang/Object;)Lio/vertx/core/json/JsonObject;
invokespecial io.vertx.ext.auth.impl.UserImpl.<init>:(Lio/vertx/core/json/JsonObject;)V
invokestatic io.vertx.core.Future.succeededFuture:(Ljava/lang/Object;)Lio/vertx/core/Future;
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
7: goto 12
8: 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
end local 3 9: goto 12
StackMap locals: io.vertx.ext.auth.htpasswd.impl.HtpasswdAuthImpl io.vertx.ext.auth.authentication.Credentials io.vertx.core.Handler
StackMap stack: java.lang.RuntimeException
10: astore 3
start local 3 11: aload 2
aload 3
invokestatic io.vertx.core.Future.failedFuture:(Ljava/lang/Throwable;)Lio/vertx/core/Future;
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
end local 3 12: StackMap locals:
StackMap stack:
return
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 credential Lio/vertx/ext/auth/authentication/Credentials;
0 13 2 resultHandler Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/vertx/ext/auth/User;>;>;
1 9 3 authInfo Lio/vertx/ext/auth/authentication/UsernamePasswordCredentials;
11 12 3 e Ljava/lang/RuntimeException;
Exception table:
from to target type
0 4 10 Class java.lang.ClassCastException
5 9 10 Class java.lang.ClassCastException
0 4 10 Class io.vertx.ext.auth.authentication.CredentialValidationException
5 9 10 Class io.vertx.ext.auth.authentication.CredentialValidationException
Signature: (Lio/vertx/ext/auth/authentication/Credentials;Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/vertx/ext/auth/User;>;>;)V
MethodParameters:
Name Flags
credential
resultHandler
}
SourceFile: "HtpasswdAuthImpl.java"