Package io.vertx.ext.web.handler
Interface JWTAuthHandler
-
- All Superinterfaces:
AuthenticationHandler,Handler<RoutingContext>
public interface JWTAuthHandler extends AuthenticationHandler
An auth handler that provides JWT Authentication support.- Author:
- Paulo Lopes
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract 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.JWTAuthHandlerscopeDelimiter(String delimiter)Set the scope delimiter.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.
-
-
-
Method Detail
-
create
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
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 use- Returns:
- the auth handler
-
scopeDelimiter
JWTAuthHandler scopeDelimiter(String delimiter)
Set the scope delimiter. By default this is a space character.- Parameters:
delimiter- scope delimiter.- Returns:
- fluent self.
-
withScope
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
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.
-
-