public class io.vertx.serviceproxy.ServiceAuthInterceptor 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.ServiceAuthInterceptor
super_class: java.lang.Object
{
private io.vertx.ext.auth.authentication.AuthenticationProvider authn;
descriptor: Lio/vertx/ext/auth/authentication/AuthenticationProvider;
flags: (0x0002) ACC_PRIVATE
private io.vertx.ext.auth.authorization.AuthorizationProvider authz;
descriptor: Lio/vertx/ext/auth/authorization/AuthorizationProvider;
flags: (0x0002) ACC_PRIVATE
private java.util.Set<io.vertx.ext.auth.authorization.Authorization> authorizations;
descriptor: Ljava/util/Set;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Set<Lio/vertx/ext/auth/authorization/Authorization;>;
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/ServiceAuthInterceptor;
public io.vertx.serviceproxy.ServiceAuthInterceptor setAuthenticationProvider(io.vertx.ext.auth.authentication.AuthenticationProvider);
descriptor: (Lio/vertx/ext/auth/authentication/AuthenticationProvider;)Lio/vertx/serviceproxy/ServiceAuthInterceptor;
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.ServiceAuthInterceptor.authn:Lio/vertx/ext/auth/authentication/AuthenticationProvider;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/vertx/serviceproxy/ServiceAuthInterceptor;
0 2 1 provider Lio/vertx/ext/auth/authentication/AuthenticationProvider;
MethodParameters:
Name Flags
provider
public io.vertx.serviceproxy.ServiceAuthInterceptor setAuthorizationProvider(io.vertx.ext.auth.authorization.AuthorizationProvider);
descriptor: (Lio/vertx/ext/auth/authorization/AuthorizationProvider;)Lio/vertx/serviceproxy/ServiceAuthInterceptor;
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.ServiceAuthInterceptor.authz:Lio/vertx/ext/auth/authorization/AuthorizationProvider;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/vertx/serviceproxy/ServiceAuthInterceptor;
0 2 1 provider Lio/vertx/ext/auth/authorization/AuthorizationProvider;
MethodParameters:
Name Flags
provider
public io.vertx.serviceproxy.ServiceAuthInterceptor setAuthorizations(java.util.Set<io.vertx.ext.auth.authorization.Authorization>);
descriptor: (Ljava/util/Set;)Lio/vertx/serviceproxy/ServiceAuthInterceptor;
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.ServiceAuthInterceptor.authorizations: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/ServiceAuthInterceptor;
0 2 1 authorizations Ljava/util/Set<Lio/vertx/ext/auth/authorization/Authorization;>;
Signature: (Ljava/util/Set<Lio/vertx/ext/auth/authorization/Authorization;>;)Lio/vertx/serviceproxy/ServiceAuthInterceptor;
MethodParameters:
Name Flags
authorizations
public io.vertx.serviceproxy.ServiceAuthInterceptor addAuthorization(io.vertx.ext.auth.authorization.Authorization);
descriptor: (Lio/vertx/ext/auth/authorization/Authorization;)Lio/vertx/serviceproxy/ServiceAuthInterceptor;
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.ServiceAuthInterceptor.authorizations:Ljava/util/Set;
ifnonnull 2
1: aload 0
new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
putfield io.vertx.serviceproxy.ServiceAuthInterceptor.authorizations:Ljava/util/Set;
2: StackMap locals:
StackMap stack:
aload 0
getfield io.vertx.serviceproxy.ServiceAuthInterceptor.authorizations: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/ServiceAuthInterceptor;
0 4 1 authorization Lio/vertx/ext/auth/authorization/Authorization;
MethodParameters:
Name Flags
authorization
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=6, locals=4, args_size=2
start local 0 start local 1 0: new io.vertx.ext.auth.authentication.TokenCredentials
dup
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;
invokespecial io.vertx.ext.auth.authentication.TokenCredentials.<init>:(Ljava/lang/String;)V
astore 2
start local 2 1: aload 2
aconst_null
invokevirtual io.vertx.ext.auth.authentication.TokenCredentials.checkValid:(Ljava/lang/Object;)V
2: invokestatic io.vertx.core.Promise.promise:()Lio/vertx/core/Promise;
astore 3
start local 3 3: aload 0
getfield io.vertx.serviceproxy.ServiceAuthInterceptor.authn:Lio/vertx/ext/auth/authentication/AuthenticationProvider;
ifnonnull 7
4: aload 3
new io.vertx.core.eventbus.ReplyException
dup
getstatic io.vertx.core.eventbus.ReplyFailure.RECIPIENT_FAILURE:Lio/vertx/core/eventbus/ReplyFailure;
sipush 500
ldc "No AuthenticationProvider present"
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
5: aload 3
invokeinterface io.vertx.core.Promise.future:()Lio/vertx/core/Future;
6: areturn
7: StackMap locals: io.vertx.ext.auth.authentication.TokenCredentials io.vertx.core.Promise
StackMap stack:
aload 0
getfield io.vertx.serviceproxy.ServiceAuthInterceptor.authn:Lio/vertx/ext/auth/authentication/AuthenticationProvider;
aload 2
aload 0
aload 3
aload 1
invokedynamic handle(Lio/vertx/serviceproxy/ServiceAuthInterceptor;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/ServiceAuthInterceptor.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.authentication.AuthenticationProvider.authenticate:(Lio/vertx/ext/auth/authentication/Credentials;Lio/vertx/core/Handler;)V
8: aload 3
invokeinterface io.vertx.core.Promise.future:()Lio/vertx/core/Future;
9: areturn
end local 3 10: StackMap locals: io.vertx.serviceproxy.ServiceAuthInterceptor io.vertx.core.eventbus.Message io.vertx.ext.auth.authentication.TokenCredentials
StackMap stack: io.vertx.ext.auth.authentication.CredentialValidationException
pop
11: 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
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lio/vertx/serviceproxy/ServiceAuthInterceptor;
0 12 1 msg Lio/vertx/core/eventbus/Message<Lio/vertx/core/json/JsonObject;>;
1 12 2 authorization Lio/vertx/ext/auth/authentication/TokenCredentials;
3 10 3 promise Lio/vertx/core/Promise<Lio/vertx/core/eventbus/Message<Lio/vertx/core/json/JsonObject;>;>;
Exception table:
from to target type
1 6 10 Class io.vertx.ext.auth.authentication.CredentialValidationException
7 9 10 Class io.vertx.ext.auth.authentication.CredentialValidationException
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.ServiceAuthInterceptor.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=7, locals=5, 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 401
ldc "Unauthorized"
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.ServiceAuthInterceptor.authorizations:Ljava/util/Set;
ifnull 8
aload 0
getfield io.vertx.serviceproxy.ServiceAuthInterceptor.authorizations:Ljava/util/Set;
invokeinterface java.util.Set.isEmpty:()Z
ifeq 10
8: StackMap locals:
StackMap stack:
aload 1
aload 2
invokeinterface io.vertx.core.Promise.complete:(Ljava/lang/Object;)V
9: return
10: StackMap locals:
StackMap stack:
aload 0
getfield io.vertx.serviceproxy.ServiceAuthInterceptor.authz:Lio/vertx/ext/auth/authorization/AuthorizationProvider;
aload 4
aload 0
aload 1
aload 3
aload 4
aload 2
invokedynamic handle(Lio/vertx/serviceproxy/ServiceAuthInterceptor;Lio/vertx/core/Promise;Lio/vertx/core/AsyncResult;Lio/vertx/ext/auth/User;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/ServiceAuthInterceptor.lambda$1(Lio/vertx/core/Promise;Lio/vertx/core/AsyncResult;Lio/vertx/ext/auth/User;Lio/vertx/core/eventbus/Message;Lio/vertx/core/AsyncResult;)V (7)
(Lio/vertx/core/AsyncResult;)V
invokeinterface io.vertx.ext.auth.authorization.AuthorizationProvider.getAuthorizations:(Lio/vertx/ext/auth/User;Lio/vertx/core/Handler;)V
end local 4 11: return
end local 3 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lio/vertx/serviceproxy/ServiceAuthInterceptor;
0 12 3 authenticate Lio/vertx/core/AsyncResult<Lio/vertx/ext/auth/User;>;
4 11 4 user Lio/vertx/ext/auth/User;
private void lambda$1(io.vertx.core.Promise, io.vertx.core.AsyncResult, io.vertx.ext.auth.User, io.vertx.core.eventbus.Message, io.vertx.core.AsyncResult);
descriptor: (Lio/vertx/core/Promise;Lio/vertx/core/AsyncResult;Lio/vertx/ext/auth/User;Lio/vertx/core/eventbus/Message;Lio/vertx/core/AsyncResult;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=6, locals=9, args_size=6
start local 0 start local 5 0: aload 5
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 2
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: goto 11
3: StackMap locals:
StackMap stack:
aload 3
invokestatic io.vertx.ext.auth.authorization.AuthorizationContext.create:(Lio/vertx/ext/auth/User;)Lio/vertx/ext/auth/authorization/AuthorizationContext;
astore 6
start local 6 4: aload 0
getfield io.vertx.serviceproxy.ServiceAuthInterceptor.authorizations:Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 8
goto 9
StackMap locals: io.vertx.serviceproxy.ServiceAuthInterceptor io.vertx.core.Promise io.vertx.core.AsyncResult io.vertx.ext.auth.User io.vertx.core.eventbus.Message io.vertx.core.AsyncResult io.vertx.ext.auth.authorization.AuthorizationContext top java.util.Iterator
StackMap stack:
5: aload 8
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast io.vertx.ext.auth.authorization.Authorization
astore 7
start local 7 6: aload 7
aload 6
invokeinterface io.vertx.ext.auth.authorization.Authorization.match:(Lio/vertx/ext/auth/authorization/AuthorizationContext;)Z
ifne 9
7: 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
8: return
end local 7 9: StackMap locals:
StackMap stack:
aload 8
invokeinterface java.util.Iterator.hasNext:()Z
ifne 5
10: aload 1
aload 4
invokeinterface io.vertx.core.Promise.complete:(Ljava/lang/Object;)V
end local 6 11: StackMap locals: io.vertx.serviceproxy.ServiceAuthInterceptor io.vertx.core.Promise io.vertx.core.AsyncResult io.vertx.ext.auth.User io.vertx.core.eventbus.Message io.vertx.core.AsyncResult
StackMap stack:
return
end local 5 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lio/vertx/serviceproxy/ServiceAuthInterceptor;
0 12 5 getAuthorizations Lio/vertx/core/AsyncResult<Ljava/lang/Void;>;
4 11 6 context Lio/vertx/ext/auth/authorization/AuthorizationContext;
6 9 7 authority Lio/vertx/ext/auth/authorization/Authorization;
}
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: "ServiceAuthInterceptor.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles