Package io.vertx.ext.auth.jwt
Interface JWTAuth
-
- All Superinterfaces:
AuthenticationProvider
public interface JWTAuth extends AuthenticationProvider
Factory interface for creating JWT basedAuthenticationProviderinstances.- Author:
- Paulo Lopes
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static JWTAuthcreate(Vertx vertx, JWTAuthOptions config)Create a JWT auth providerStringgenerateToken(JsonObject claims)Generate a new JWT token.StringgenerateToken(JsonObject claims, JWTOptions options)Generate a new JWT token.-
Methods inherited from interface io.vertx.ext.auth.authentication.AuthenticationProvider
authenticate
-
-
-
-
Method Detail
-
create
static JWTAuth create(Vertx vertx, JWTAuthOptions config)
Create a JWT auth provider- Parameters:
vertx- the Vertx instanceconfig- the config- Returns:
- the auth provider
-
generateToken
String generateToken(JsonObject claims, JWTOptions options)
Generate a new JWT token.- Parameters:
claims- Json with user defined claims for a list of official claimsoptions- extra options for the generation- Returns:
- JWT encoded token
- See Also:
- www.iana.org/assignments/jwt/jwt.xhtml
-
generateToken
String generateToken(JsonObject claims)
Generate a new JWT token.- Parameters:
claims- Json with user defined claims for a list of official claims- Returns:
- JWT encoded token
- See Also:
- www.iana.org/assignments/jwt/jwt.xhtml
-
-