Class DefaultTokenExchangeProvider

java.lang.Object
org.keycloak.protocol.oidc.DefaultTokenExchangeProvider
All Implemented Interfaces:
TokenExchangeProvider, Provider

public class DefaultTokenExchangeProvider extends Object implements TokenExchangeProvider
Default token exchange implementation
Author:
Dmitry Telegin
  • Constructor Details

    • DefaultTokenExchangeProvider

      public DefaultTokenExchangeProvider()
  • Method Details

    • supports

      public boolean supports(TokenExchangeContext context)
      Description copied from interface: TokenExchangeProvider
      Check if exchange request is supported by this provider
      Specified by:
      supports in interface TokenExchangeProvider
      Parameters:
      context - token exchange context
      Returns:
      true if the request is supported
    • exchange

      public jakarta.ws.rs.core.Response exchange(TokenExchangeContext context)
      Description copied from interface: TokenExchangeProvider
      Exchange the token.
      Specified by:
      exchange in interface TokenExchangeProvider
      Returns:
      response with a new token
    • close

      public void close()
      Specified by:
      close in interface Provider
    • tokenExchange

      protected jakarta.ws.rs.core.Response tokenExchange()
    • exchangeToIdentityProvider

      protected jakarta.ws.rs.core.Response exchangeToIdentityProvider(UserModel targetUser, UserSessionModel targetUserSession, String requestedIssuer)
    • exchangeClientToClient

      protected jakarta.ws.rs.core.Response exchangeClientToClient(UserModel targetUser, UserSessionModel targetUserSession, AccessToken token, boolean disallowOnHolderOfTokenMismatch)
    • exchangeClientToOIDCClient

      protected jakarta.ws.rs.core.Response exchangeClientToOIDCClient(UserModel targetUser, UserSessionModel targetUserSession, String requestedTokenType, ClientModel targetClient, String audience, String scope)
    • exchangeClientToSAML2Client

      protected jakarta.ws.rs.core.Response exchangeClientToSAML2Client(UserModel targetUser, UserSessionModel targetUserSession, String requestedTokenType, ClientModel targetClient)
    • exchangeExternalToken

      protected jakarta.ws.rs.core.Response exchangeExternalToken(String issuer, String subjectToken)
    • importUserFromExternalIdentity

      protected UserModel importUserFromExternalIdentity(BrokeredIdentityContext context)