public interface TokenGenerator
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.String> |
generateToken(Authentication authentication,
java.lang.Integer expiration) |
java.util.Optional<java.lang.String> |
generateToken(java.util.Map<java.lang.String,java.lang.Object> claims) |
java.util.Optional<java.lang.String> generateToken(Authentication authentication, @Nullable java.lang.Integer expiration)
authentication
- Authenticated user's representation.expiration
- The amount of time in milliseconds until the token expiresjava.util.Optional<java.lang.String> generateToken(java.util.Map<java.lang.String,java.lang.Object> claims)
claims
- Claims to be included in the JWT token to be generated