Interface AccessRefreshTokenGenerator
- All Known Implementing Classes:
DefaultAccessRefreshTokenGenerator
@DefaultImplementation(DefaultAccessRefreshTokenGenerator.class)
public interface AccessRefreshTokenGenerator
Contract to generate
AccessRefreshToken
for a particular user.- Since:
- 2.0.0
- Author:
- Sergio del Amo
-
Method Summary
Modifier and TypeMethodDescription@NonNull Optional<AccessRefreshToken>
generate
(@NonNull Authentication authentication) @NonNull Optional<AccessRefreshToken>
generate
(@NonNull String refreshToken, @NonNull Authentication authentication) @NonNull Optional<AccessRefreshToken>
generateRefreshToken
(@NonNull Authentication authentication)
-
Method Details
-
generate
@NonNull @NonNull Optional<AccessRefreshToken> generate(@NonNull @NonNull Authentication authentication) - Parameters:
authentication
- User's authentication- Returns:
- An Optional
AccessRefreshToken
-
generateRefreshToken
@NonNull @NonNull Optional<String> generateRefreshToken(@NonNull @NonNull Authentication authentication) - Parameters:
authentication
- User's authentication- Returns:
- An Optional refresh token
-
generate
@NonNull @NonNull Optional<AccessRefreshToken> generate(@NonNull @NonNull String refreshToken, @NonNull @NonNull Map<String, ?> oldClaims) - Parameters:
refreshToken
- refresh tokenoldClaims
- oldClaims- Returns:
- An Optional
AccessRefreshToken
-
generate
@NonNull @NonNull Optional<AccessRefreshToken> generate(@NonNull @NonNull String refreshToken, @NonNull @NonNull Authentication authentication) - Parameters:
refreshToken
- refresh tokenauthentication
- User's authentication- Returns:
- An Optional refresh token
-