Interface TokenService
- All Known Implementing Classes:
TokenServiceImpl
public interface TokenService
Token service interface for managing the jwt feature
- Version:
- 1.0
- Author:
- Mirna Gama
-
Method Summary
Modifier and TypeMethodDescriptiongenerateToken(User user) Generates the authorization tokengetTokenSubject(String token) Gets the jwt subject
-
Method Details
-
generateToken
Generates the authorization token- Parameters:
user- The authenticated user- Returns:
- A string containing the authorization token
-
getTokenSubject
Gets the jwt subject- Parameters:
token- The json web token on request header- Returns:
- A string containing the subject from the decoded jwt
-