Interface RefreshTokenValidator

All Known Implementing Classes:
SignedRefreshTokenGenerator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface RefreshTokenValidator
Responsible for validating a refresh token is in a valid format. This logic is separate from determining if the refresh token has been revoked or otherwise not present in the persistence layer.
Since:
2.0.0
Author:
James Kleeh
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull Optional<String>
    validate(@NonNull String refreshToken)
     
  • Method Details

    • validate

      @NonNull @NonNull Optional<String> validate(@NonNull @NonNull String refreshToken)
      Parameters:
      refreshToken - The refresh token
      Returns:
      The validated token wrapped in an Optional or Optional#empty() if the supplied token is invalid.