Interface JwtService
- All Known Implementing Classes:
JwtServiceImpl
public interface JwtService
Javascript Web Token Services interface.
-
Method Summary
Modifier and TypeMethodDescriptioncreateJwtFromSpec(JwtBearerToken token) Create a new JWT.Check if the given javascript web token is valid.
-
Method Details
-
validateAuthentication
Check if the given javascript web token is valid.- Parameters:
jwt- valid signed JWT.- Returns:
- a spring authentication token if valid, null in other case
- Throws:
InvalidCredentialsException- if the token can not be validated.
-
createJwtFromSpec
Create a new JWT.- Parameters:
token- JWT details. The token ID, if missing, is generated (UUID).- Returns:
- a new signed JWT.
- Throws:
InvalidCallException- if the token can not be created due to invalid argument data.UnexpectedException- if the token can not be created due to an unexpected error condition.
-