Interface TokenExchangeProvider

All Superinterfaces:
Provider
All Known Implementing Classes:
AbstractTokenExchangeProvider, ExternalToInternalTokenExchangeProvider, StandardTokenExchangeProvider, V1TokenExchangeProvider

public interface TokenExchangeProvider extends Provider
Provides token exchange mechanism for supported tokens
Author:
Dmitry Telegin
  • Method Details

    • supports

      boolean supports(TokenExchangeContext context)
      Check if exchange request is supported by this provider
      Parameters:
      context - token exchange context
      Returns:
      true if the request is supported
    • exchange

      jakarta.ws.rs.core.Response exchange(TokenExchangeContext context)
      Exchange the token.
      Parameters:
      context -
      Returns:
      response with a new token
    • getVersion

      int getVersion()
      Returns:
      version of the token-exchange provider. Could be useful by various components (like for example identity-providers), which need to interact with the token-exchange provider to doublecheck if it should have a "legacy" behaviour (for older version of token-exchange provider) or a "new" behaviour