Interface RefreshTokenGenerator


  • public interface RefreshTokenGenerator
    Responsible for generating refresh tokens. This class assumes the internal value of the token will be transformed in some way before being sent to the client.
    Since:
    2.0.0
    • Method Detail

      • createKey

        @NonNull
        java.lang.String createKey​(@NonNull
                                   Authentication authentication)
        Parameters:
        authentication - The user details
        Returns:
        The internal value that will persisted.
      • generate

        @NonNull
        java.util.Optional<java.lang.String> generate​(@NonNull
                                                      Authentication authentication,
                                                      @NonNull
                                                      java.lang.String token)
        Parameters:
        authentication - The user details
        token - The internal value
        Returns:
        The refresh token