public class io.vertx.serviceproxy.ServiceJWTInterceptor implements java.util.function.Function<io.vertx.core.eventbus.Message<io.vertx.core.json.JsonObject>, io.vertx.core.Future<io.vertx.core.eventbus.Message<io.vertx.core.json.JsonObject>>>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.vertx.serviceproxy.ServiceJWTInterceptor
super_class: java.lang.Object
{
private io.vertx.ext.auth.jwt.JWTAuth jwtAuth;
descriptor: Lio/vertx/ext/auth/jwt/JWTAuth;
flags: (0x0002) ACC_PRIVATE
private java.util.Set<java.lang.String> authorities;
descriptor: Ljava/util/Set;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Set<Ljava/lang/String;>;
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/vertx/serviceproxy/ServiceJWTInterceptor;
public io.vertx.serviceproxy.ServiceJWTInterceptor setJwtAuth(io.vertx.ext.auth.jwt.JWTAuth);
descriptor: (Lio/vertx/ext/auth/jwt/JWTAuth;)Lio/vertx/serviceproxy/ServiceJWTInterceptor;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield io.vertx.serviceproxy.ServiceJWTInterceptor.jwtAuth:Lio/vertx/ext/auth/jwt/JWTAuth;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/vertx/serviceproxy/ServiceJWTInterceptor;
0 2 1 jwtAuth Lio/vertx/ext/auth/jwt/JWTAuth;
MethodParameters:
Name Flags
jwtAuth
public io.vertx.serviceproxy.ServiceJWTInterceptor setAuthorities(java.util.Set<java.lang.String>);
descriptor: (Ljava/util/Set;)Lio/vertx/serviceproxy/ServiceJWTInterceptor;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield io.vertx.serviceproxy.ServiceJWTInterceptor.authorities:Ljava/util/Set;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/vertx/serviceproxy/ServiceJWTInterceptor;
0 2 1 authorities Ljava/util/Set<Ljava/lang/String;>;
Signature: (Ljava/util/Set<Ljava/lang/String;>;)Lio/vertx/serviceproxy/ServiceJWTInterceptor;
MethodParameters:
Name Flags
authorities
public io.vertx.serviceproxy.ServiceJWTInterceptor addAuthority(java.lang.String);
descriptor: (Ljava/lang/String;)Lio/vertx/serviceproxy/ServiceJWTInterceptor;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield io.vertx.serviceproxy.ServiceJWTInterceptor.authorities:Ljava/util/Set;
ifnonnull 2
1: aload 0
new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
putfield io.vertx.serviceproxy.ServiceJWTInterceptor.authorities:Ljava/util/Set;
2: StackMap locals:
StackMap stack:
aload 0
getfield io.vertx.serviceproxy.ServiceJWTInterceptor.authorities:Ljava/util/Set;
aload 1
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
3: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lio/vertx/serviceproxy/ServiceJWTInterceptor;
0 4 1 authority Ljava/lang/String;
MethodParameters:
Name Flags
authority
public io.vertx.serviceproxy.ServiceJWTInterceptor clearAuthorities();
descriptor: ()Lio/vertx/serviceproxy/ServiceJWTInterceptor;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.vertx.serviceproxy.ServiceJWTInterceptor.authorities:Ljava/util/Set;
ifnull 2
1: aload 0
getfield io.vertx.serviceproxy.ServiceJWTInterceptor.authorities:Ljava/util/Set;
invokeinterface java.util.Set.clear:()V
2: StackMap locals:
StackMap stack:
aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/vertx/serviceproxy/ServiceJWTInterceptor;
public io.vertx.core.Future<io.vertx.core.eventbus.Message<io.vertx.core.json.JsonObject>> apply(io.vertx.core.eventbus.Message<io.vertx.core.json.JsonObject>);
descriptor: (Lio/vertx/core/eventbus/Message;)Lio/vertx/core/Future;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface io.vertx.core.eventbus.Message.headers:()Lio/vertx/core/MultiMap;
ldc "auth-token"
invokeinterface io.vertx.core.MultiMap.get:(Ljava/lang/String;)Ljava/lang/String;
astore 2
start local 2 1: aload 2
ifnonnull 3
2: new io.vertx.core.eventbus.ReplyException
dup
getstatic io.vertx.core.eventbus.ReplyFailure.RECIPIENT_FAILURE:Lio/vertx/core/eventbus/ReplyFailure;
sipush 401
ldc "Unauthorized"
invokespecial io.vertx.core.eventbus.ReplyException.<init>:(Lio/vertx/core/eventbus/ReplyFailure;ILjava/lang/String;)V
invokestatic io.vertx.core.Future.failedFuture:(Ljava/lang/Throwable;)Lio/vertx/core/Future;
areturn
3: StackMap locals: java.lang.String
StackMap stack:
invokestatic io.vertx.core.Promise.promise:()Lio/vertx/core/Promise;
astore 3
start local 3 4: aload 0
getfield io.vertx.serviceproxy.ServiceJWTInterceptor.jwtAuth:Lio/vertx/ext/auth/jwt/JWTAuth;
new io.vertx.core.json.JsonObject
dup
invokespecial io.vertx.core.json.JsonObject.<init>:()V
ldc "jwt"
aload 2
invokevirtual io.vertx.core.json.JsonObject.put:(Ljava/lang/String;Ljava/lang/String;)Lio/vertx/core/json/JsonObject;
aload 0
aload 3
aload 1
invokedynamic handle(Lio/vertx/serviceproxy/ServiceJWTInterceptor;Lio/vertx/core/Promise;Lio/vertx/core/eventbus/Message;)Lio/vertx/core/Handler;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)V
io/vertx/serviceproxy/ServiceJWTInterceptor.lambda$0(Lio/vertx/core/Promise;Lio/vertx/core/eventbus/Message;Lio/vertx/core/AsyncResult;)V (7)
(Lio/vertx/core/AsyncResult;)V
invokeinterface io.vertx.ext.auth.jwt.JWTAuth.authenticate:(Lio/vertx/core/json/JsonObject;Lio/vertx/core/Handler;)V
5: aload 3
invokeinterface io.vertx.core.Promise.future:()Lio/vertx/core/Future;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lio/vertx/serviceproxy/ServiceJWTInterceptor;
0 6 1 msg Lio/vertx/core/eventbus/Message<Lio/vertx/core/json/JsonObject;>;
1 6 2 authorization Ljava/lang/String;
4 6 3 promise Lio/vertx/core/Promise<Lio/vertx/core/eventbus/Message<Lio/vertx/core/json/JsonObject;>;>;
Signature: (Lio/vertx/core/eventbus/Message<Lio/vertx/core/json/JsonObject;>;)Lio/vertx/core/Future<Lio/vertx/core/eventbus/Message<Lio/vertx/core/json/JsonObject;>;>;
MethodParameters:
Name Flags
msg
public java.lang.Object apply(java.lang.Object);
descriptor: (Ljava/lang/Object;)Ljava/lang/Object;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload 0
aload 1
checkcast io.vertx.core.eventbus.Message
invokevirtual io.vertx.serviceproxy.ServiceJWTInterceptor.apply:(Lio/vertx/core/eventbus/Message;)Lio/vertx/core/Future;
areturn
LocalVariableTable:
Start End Slot Name Signature
private void lambda$0(io.vertx.core.Promise, io.vertx.core.eventbus.Message, io.vertx.core.AsyncResult);
descriptor: (Lio/vertx/core/Promise;Lio/vertx/core/eventbus/Message;Lio/vertx/core/AsyncResult;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=6, locals=11, args_size=4
start local 0 start local 3 0: aload 3
invokeinterface io.vertx.core.AsyncResult.failed:()Z
ifeq 3
1: aload 1
new io.vertx.core.eventbus.ReplyException
dup
getstatic io.vertx.core.eventbus.ReplyFailure.RECIPIENT_FAILURE:Lio/vertx/core/eventbus/ReplyFailure;
sipush 500
aload 3
invokeinterface io.vertx.core.AsyncResult.cause:()Ljava/lang/Throwable;
invokevirtual java.lang.Throwable.getMessage:()Ljava/lang/String;
invokespecial io.vertx.core.eventbus.ReplyException.<init>:(Lio/vertx/core/eventbus/ReplyFailure;ILjava/lang/String;)V
invokeinterface io.vertx.core.Promise.fail:(Ljava/lang/Throwable;)V
2: return
3: StackMap locals:
StackMap stack:
aload 3
invokeinterface io.vertx.core.AsyncResult.result:()Ljava/lang/Object;
checkcast io.vertx.ext.auth.User
astore 4
start local 4 4: aload 4
ifnonnull 7
5: aload 1
new io.vertx.core.eventbus.ReplyException
dup
getstatic io.vertx.core.eventbus.ReplyFailure.RECIPIENT_FAILURE:Lio/vertx/core/eventbus/ReplyFailure;
sipush 403
ldc "Forbidden"
invokespecial io.vertx.core.eventbus.ReplyException.<init>:(Lio/vertx/core/eventbus/ReplyFailure;ILjava/lang/String;)V
invokeinterface io.vertx.core.Promise.fail:(Ljava/lang/Throwable;)V
6: return
7: StackMap locals: io.vertx.ext.auth.User
StackMap stack:
aload 0
getfield io.vertx.serviceproxy.ServiceJWTInterceptor.authorities:Ljava/util/Set;
ifnonnull 8
iconst_0
goto 9
StackMap locals:
StackMap stack:
8: aload 0
getfield io.vertx.serviceproxy.ServiceJWTInterceptor.authorities:Ljava/util/Set;
invokeinterface java.util.Set.size:()I
StackMap locals:
StackMap stack: int
9: istore 5
start local 5 10: iload 5
ifle 20
11: new java.util.concurrent.atomic.AtomicInteger
dup
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:()V
astore 6
start local 6 12: new java.util.concurrent.atomic.AtomicBoolean
dup
invokespecial java.util.concurrent.atomic.AtomicBoolean.<init>:()V
astore 7
start local 7 13: aload 6
iload 5
aload 1
aload 2
aload 7
invokedynamic handle(Ljava/util/concurrent/atomic/AtomicInteger;ILio/vertx/core/Promise;Lio/vertx/core/eventbus/Message;Ljava/util/concurrent/atomic/AtomicBoolean;)Lio/vertx/core/Handler;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)V
io/vertx/serviceproxy/ServiceJWTInterceptor.lambda$1(Ljava/util/concurrent/atomic/AtomicInteger;ILio/vertx/core/Promise;Lio/vertx/core/eventbus/Message;Ljava/util/concurrent/atomic/AtomicBoolean;Lio/vertx/core/AsyncResult;)V (6)
(Lio/vertx/core/AsyncResult;)V
astore 8
start local 8 14: aload 0
getfield io.vertx.serviceproxy.ServiceJWTInterceptor.authorities:Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 10
goto 18
StackMap locals: io.vertx.serviceproxy.ServiceJWTInterceptor io.vertx.core.Promise io.vertx.core.eventbus.Message io.vertx.core.AsyncResult io.vertx.ext.auth.User int java.util.concurrent.atomic.AtomicInteger java.util.concurrent.atomic.AtomicBoolean io.vertx.core.Handler top java.util.Iterator
StackMap stack:
15: aload 10
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 9
start local 9 16: aload 7
invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
ifne 18
17: aload 4
aload 9
aload 8
invokeinterface io.vertx.ext.auth.User.isAuthorised:(Ljava/lang/String;Lio/vertx/core/Handler;)Lio/vertx/ext/auth/User;
pop
end local 9 18: StackMap locals:
StackMap stack:
aload 10
invokeinterface java.util.Iterator.hasNext:()Z
ifne 15
end local 8 end local 7 end local 6 19: goto 21
20: StackMap locals: io.vertx.serviceproxy.ServiceJWTInterceptor io.vertx.core.Promise io.vertx.core.eventbus.Message io.vertx.core.AsyncResult io.vertx.ext.auth.User int
StackMap stack:
aload 1
aload 2
invokeinterface io.vertx.core.Promise.complete:(Ljava/lang/Object;)V
end local 5 end local 4 21: StackMap locals:
StackMap stack:
return
end local 3 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 this Lio/vertx/serviceproxy/ServiceJWTInterceptor;
0 22 3 authenticate Lio/vertx/core/AsyncResult<Lio/vertx/ext/auth/User;>;
4 21 4 user Lio/vertx/ext/auth/User;
10 21 5 requiredcount I
12 19 6 count Ljava/util/concurrent/atomic/AtomicInteger;
13 19 7 sentFailure Ljava/util/concurrent/atomic/AtomicBoolean;
14 19 8 authHandler Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Ljava/lang/Boolean;>;>;
16 18 9 authority Ljava/lang/String;
private static void lambda$1(java.util.concurrent.atomic.AtomicInteger, int, io.vertx.core.Promise, io.vertx.core.eventbus.Message, java.util.concurrent.atomic.AtomicBoolean, io.vertx.core.AsyncResult);
descriptor: (Ljava/util/concurrent/atomic/AtomicInteger;ILio/vertx/core/Promise;Lio/vertx/core/eventbus/Message;Ljava/util/concurrent/atomic/AtomicBoolean;Lio/vertx/core/AsyncResult;)V
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=6, locals=6, args_size=6
start local 5 0: aload 5
invokeinterface io.vertx.core.AsyncResult.succeeded:()Z
ifeq 8
1: aload 5
invokeinterface io.vertx.core.AsyncResult.result:()Ljava/lang/Object;
checkcast java.lang.Boolean
invokevirtual java.lang.Boolean.booleanValue:()Z
ifeq 5
2: aload 0
invokevirtual java.util.concurrent.atomic.AtomicInteger.incrementAndGet:()I
iload 1
if_icmpne 9
3: aload 2
aload 3
invokeinterface io.vertx.core.Promise.complete:(Ljava/lang/Object;)V
4: goto 9
5: StackMap locals:
StackMap stack:
aload 4
iconst_0
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.compareAndSet:(ZZ)Z
ifeq 9
6: aload 2
new io.vertx.core.eventbus.ReplyException
dup
getstatic io.vertx.core.eventbus.ReplyFailure.RECIPIENT_FAILURE:Lio/vertx/core/eventbus/ReplyFailure;
sipush 403
ldc "Forbidden"
invokespecial io.vertx.core.eventbus.ReplyException.<init>:(Lio/vertx/core/eventbus/ReplyFailure;ILjava/lang/String;)V
invokeinterface io.vertx.core.Promise.fail:(Ljava/lang/Throwable;)V
7: goto 9
8: StackMap locals:
StackMap stack:
aload 2
new io.vertx.core.eventbus.ReplyException
dup
getstatic io.vertx.core.eventbus.ReplyFailure.RECIPIENT_FAILURE:Lio/vertx/core/eventbus/ReplyFailure;
sipush 500
aload 5
invokeinterface io.vertx.core.AsyncResult.cause:()Ljava/lang/Throwable;
invokevirtual java.lang.Throwable.getMessage:()Ljava/lang/String;
invokespecial io.vertx.core.eventbus.ReplyException.<init>:(Lio/vertx/core/eventbus/ReplyFailure;ILjava/lang/String;)V
invokeinterface io.vertx.core.Promise.fail:(Ljava/lang/Throwable;)V
9: StackMap locals:
StackMap stack:
return
end local 5 LocalVariableTable:
Start End Slot Name Signature
0 10 5 res Lio/vertx/core/AsyncResult<Ljava/lang/Boolean;>;
}
Signature: Ljava/lang/Object;Ljava/util/function/Function<Lio/vertx/core/eventbus/Message<Lio/vertx/core/json/JsonObject;>;Lio/vertx/core/Future<Lio/vertx/core/eventbus/Message<Lio/vertx/core/json/JsonObject;>;>;>;
SourceFile: "ServiceJWTInterceptor.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles