Interface TokenResolver<T>

Type Parameters:
T - request
All Known Implementing Classes:
DefaultTokenResolver

@DefaultImplementation(DefaultTokenResolver.class) public interface TokenResolver<T>
Returns the token from the provided request.
Since:
1.1.0
Author:
Sergio del Amo
  • Method Summary

    Modifier and Type
    Method
    Description
    resolveToken(T request)
    Deprecated, for removal: This API element is subject to removal in a future version.
    default @NonNull List<String>
    resolveTokens(T request)
    Returns tokens found by the supplied token readers.
  • Method Details

    • resolveToken

      @Deprecated(forRemoval=true, since="4.4.0") Optional<String> resolveToken(T request)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Resolves the token from the provided request.
      Parameters:
      request - The HTTP request.
      Returns:
      The token in the supplied request. Empty if no token was found.
    • resolveTokens

      @NonNull default @NonNull List<String> resolveTokens(@NonNull T request)
      Returns tokens found by the supplied token readers.
      Parameters:
      request - The current HTTP request.
      Returns:
      the tokens found in the supplied request.
      Since:
      4.4.0