Class JWTAuthHandler
- java.lang.Object
-
- io.vertx.reactivex.ext.web.handler.JWTAuthHandler
-
- All Implemented Interfaces:
Handler<RoutingContext>,io.vertx.lang.rx.RxDelegate,AuthenticationHandler
public class JWTAuthHandler extends Object implements io.vertx.lang.rx.RxDelegate, AuthenticationHandler, Handler<RoutingContext>
An auth handler that provides JWT Authentication support.NOTE: This class has been automatically generated from the
originalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<JWTAuthHandler>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description JWTAuthHandler(JWTAuthHandler delegate)JWTAuthHandler(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JWTAuthHandlercreate(JWTAuth authProvider)Create a JWT auth handler.static JWTAuthHandlercreate(JWTAuth authProvider, String realm)Create a JWT auth handler.booleanequals(Object o)JWTAuthHandlergetDelegate()voidhandle(RoutingContext event)Something has happened, so handle it.inthashCode()static JWTAuthHandlernewInstance(JWTAuthHandler arg)JWTAuthHandlerscopeDelimiter(String delimiter)Set the scope delimiter.StringtoString()JWTAuthHandlerwithScope(String scope)Return a new instance with the internal state copied from the caller but the scopes to be requested during a token request are unique to the instance.JWTAuthHandlerwithScopes(List<String> scopes)Return a new instance with the internal state copied from the caller but the scopes to be requested during a token request are unique to the instance.
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<JWTAuthHandler> __TYPE_ARG
-
-
Constructor Detail
-
JWTAuthHandler
public JWTAuthHandler(JWTAuthHandler delegate)
-
JWTAuthHandler
public JWTAuthHandler(Object delegate)
-
-
Method Detail
-
getDelegate
public JWTAuthHandler getDelegate()
- Specified by:
getDelegatein interfaceAuthenticationHandler- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
handle
public void handle(RoutingContext event)
Something has happened, so handle it.- Specified by:
handlein interfaceAuthenticationHandler- Specified by:
handlein interfaceHandler<RoutingContext>- Parameters:
event- the event to handle
-
create
public static JWTAuthHandler create(JWTAuth authProvider)
Create a JWT auth handler. When no scopes are explicit declared, the default scopes will be looked up from the route metadata.- Parameters:
authProvider- the auth provider to use- Returns:
- the auth handler
-
create
public static JWTAuthHandler create(JWTAuth authProvider, String realm)
Create a JWT auth handler. When no scopes are explicit declared, the default scopes will be looked up from the route metadata.- Parameters:
authProvider- the auth provider to userealm-- Returns:
- the auth handler
-
scopeDelimiter
public JWTAuthHandler scopeDelimiter(String delimiter)
Set the scope delimiter. By default this is a space character.- Parameters:
delimiter- scope delimiter.- Returns:
- fluent self.
-
withScope
public JWTAuthHandler withScope(String scope)
Return a new instance with the internal state copied from the caller but the scopes to be requested during a token request are unique to the instance. When scopes are applied to the handler, the default scopes from the route metadata will be ignored.- Parameters:
scope- scope.- Returns:
- new instance of this interface.
-
withScopes
public JWTAuthHandler withScopes(List<String> scopes)
Return a new instance with the internal state copied from the caller but the scopes to be requested during a token request are unique to the instance. When scopes are applied to the handler, the default scopes from the route metadata will be ignored.- Parameters:
scopes- scopes.- Returns:
- new instance of this interface.
-
newInstance
public static JWTAuthHandler newInstance(JWTAuthHandler arg)
-
-