Class AuthorizationHandler
- java.lang.Object
-
- io.vertx.reactivex.ext.web.handler.AuthorizationHandler
-
- All Implemented Interfaces:
Handler<RoutingContext>,RxDelegate
public class AuthorizationHandler extends Object implements RxDelegate, Handler<RoutingContext>
Base interface for authorization handlers that provide authorization support.AuthorizationHandlerImpl usually requires a
NOTE: This class has been automatically generated from theAuthenticationHandlerto be on the routing chain before it or a custom handler that has previously set aUserin theRoutingContextoriginalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<AuthorizationHandler>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description AuthorizationHandler(AuthorizationHandler delegate)AuthorizationHandler(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthorizationHandleraddAuthorizationProvider(AuthorizationProvider authorizationProvider)Adds a provider that shall be used to retrieve the required authorizations for the user to attest.static AuthorizationHandlercreate(Authorization authorization)create the the handler that will check the specified authorization Note that to check several authorizations, you can specify a sub-interface such asAndAuthorizationorOrAuthorizationbooleanequals(Object o)AuthorizationHandlergetDelegate()voidhandle(RoutingContext event)Something has happened, so handle it.inthashCode()static AuthorizationHandlernewInstance(AuthorizationHandler arg)StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<AuthorizationHandler> __TYPE_ARG
-
-
Constructor Detail
-
AuthorizationHandler
public AuthorizationHandler(AuthorizationHandler delegate)
-
AuthorizationHandler
public AuthorizationHandler(Object delegate)
-
-
Method Detail
-
getDelegate
public AuthorizationHandler getDelegate()
- Specified by:
getDelegatein interfaceRxDelegate
-
handle
public void handle(RoutingContext event)
Something has happened, so handle it.- Specified by:
handlein interfaceHandler<RoutingContext>- Parameters:
event- the event to handle
-
create
public static AuthorizationHandler create(Authorization authorization)
create the the handler that will check the specified authorization Note that to check several authorizations, you can specify a sub-interface such asAndAuthorizationorOrAuthorization- Parameters:
authorization- the authorization to attest.- Returns:
- fluent self.
-
addAuthorizationProvider
public AuthorizationHandler addAuthorizationProvider(AuthorizationProvider authorizationProvider)
Adds a provider that shall be used to retrieve the required authorizations for the user to attest. Multiple calls are allowed to retrieve authorizations from many sources.- Parameters:
authorizationProvider- a provider.- Returns:
- fluent self.
-
newInstance
public static AuthorizationHandler newInstance(AuthorizationHandler arg)
-
-