Interface JWTAuthHandler
- All Superinterfaces:
AuthenticationHandler, Handler<RoutingContext>
An auth handler that provides JWT Authentication support.
- Author:
- Paulo Lopes
-
Method Summary
Modifier and TypeMethodDescriptionstatic JWTAuthHandlerCreate a JWT auth handler.static JWTAuthHandlerCreate a JWT auth handler.scopeDelimiter(String delimiter) Set the scope delimiter.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.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.
-
Method Details
-
create
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
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
Set the scope delimiter. By default this is a space character.- Parameters:
delimiter- scope delimiter.- Returns:
- fluent self.
-
withScope
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
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.
-