Package org.keycloak.protocol.oidc
Class DefaultTokenExchangeProvider
java.lang.Object
org.keycloak.protocol.oidc.DefaultTokenExchangeProvider
- All Implemented Interfaces:
TokenExchangeProvider,Provider
Default token exchange implementation
- Author:
- Dmitry Telegin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()jakarta.ws.rs.core.Responseexchange(TokenExchangeContext context) Exchange thetoken.protected jakarta.ws.rs.core.ResponseexchangeClientToClient(UserModel targetUser, UserSessionModel targetUserSession, AccessToken token, boolean disallowOnHolderOfTokenMismatch) protected jakarta.ws.rs.core.ResponseexchangeClientToOIDCClient(UserModel targetUser, UserSessionModel targetUserSession, String requestedTokenType, ClientModel targetClient, String audience, String scope) protected jakarta.ws.rs.core.ResponseexchangeClientToSAML2Client(UserModel targetUser, UserSessionModel targetUserSession, String requestedTokenType, ClientModel targetClient) protected jakarta.ws.rs.core.ResponseexchangeExternalToken(String issuer, String subjectToken) protected jakarta.ws.rs.core.ResponseexchangeToIdentityProvider(UserModel targetUser, UserSessionModel targetUserSession, String requestedIssuer) protected UserModelbooleansupports(TokenExchangeContext context) Check if exchange request is supported by this providerprotected jakarta.ws.rs.core.Response
-
Constructor Details
-
DefaultTokenExchangeProvider
public DefaultTokenExchangeProvider()
-
-
Method Details
-
supports
Description copied from interface:TokenExchangeProviderCheck if exchange request is supported by this provider- Specified by:
supportsin interfaceTokenExchangeProvider- Parameters:
context- token exchange context- Returns:
- true if the request is supported
-
exchange
Description copied from interface:TokenExchangeProviderExchange thetoken.- Specified by:
exchangein interfaceTokenExchangeProvider- Returns:
- response with a new token
-
close
public void close() -
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
-
importUserFromExternalIdentity
-