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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
jakarta.ws.rs.core.Response
exchange
(TokenExchangeContext context) Exchange thetoken
.protected jakarta.ws.rs.core.Response
exchangeClientToClient
(UserModel targetUser, UserSessionModel targetUserSession, AccessToken token, boolean disallowOnHolderOfTokenMismatch) protected jakarta.ws.rs.core.Response
exchangeClientToOIDCClient
(UserModel targetUser, UserSessionModel targetUserSession, String requestedTokenType, ClientModel targetClient, String audience, String scope) protected jakarta.ws.rs.core.Response
exchangeClientToSAML2Client
(UserModel targetUser, UserSessionModel targetUserSession, String requestedTokenType, ClientModel targetClient) protected jakarta.ws.rs.core.Response
exchangeExternalToken
(String issuer, String subjectToken) protected jakarta.ws.rs.core.Response
exchangeToIdentityProvider
(UserModel targetUser, UserSessionModel targetUserSession, String requestedIssuer) protected UserModel
boolean
supports
(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:TokenExchangeProvider
Check if exchange request is supported by this provider- Specified by:
supports
in interfaceTokenExchangeProvider
- Parameters:
context
- token exchange context- Returns:
- true if the request is supported
-
exchange
Description copied from interface:TokenExchangeProvider
Exchange thetoken
.- Specified by:
exchange
in 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
-