Interface TokenPairGenerator
- All Known Implementing Classes:
TokenPairGeneratorImpl
public interface TokenPairGenerator
Generates JWT token pairs (access and refresh) with user claims for authentication.
-
Method Summary
Modifier and TypeMethodDescriptioncreateClaims(UserEntity user, String type) Creates JWT claims map from user entity data with token type.generateTokens(UserEntity user) Generates a complete token pair containing access and refresh tokens for the user.
-
Method Details
-
generateTokens
Generates a complete token pair containing access and refresh tokens for the user.- Parameters:
user- the user entity to generate tokens for- Returns:
- token pair with access and refresh tokens
-
createClaims
Creates JWT claims map from user entity data with token type.- Parameters:
user- the user entity to extract claims fromtype- the token type ("access" or "refresh")- Returns:
- map of claims including username, email, profilePictureUrl, and type
-