Interface RefreshTokenValidator

  • 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
    • Method Detail

      • validate

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