Class ExternalToInternalTokenExchangeProvider
java.lang.Object
org.keycloak.protocol.oidc.tokenexchange.AbstractTokenExchangeProvider
org.keycloak.protocol.oidc.tokenexchange.StandardTokenExchangeProvider
org.keycloak.protocol.oidc.tokenexchange.ExternalToInternalTokenExchangeProvider
- All Implemented Interfaces:
TokenExchangeProvider
,Provider
Provider for external-internal token exchange
- Author:
- Marek Posolda
-
Nested Class Summary
Nested classes/interfaces inherited from class org.keycloak.protocol.oidc.tokenexchange.AbstractTokenExchangeProvider
AbstractTokenExchangeProvider.ExternalExchangeContext
-
Field Summary
Fields inherited from class org.keycloak.protocol.oidc.tokenexchange.AbstractTokenExchangeProvider
client, clientAuthAttributes, clientConnection, context, cors, event, formParams, headers, params, realm, session, tokenManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected jakarta.ws.rs.core.Response
exchangeExternalToken
(String subjectIssuer, String subjectToken) protected String
int
boolean
supports
(TokenExchangeContext context) Check if exchange request is supported by this providerprotected jakarta.ws.rs.core.Response
Methods inherited from class org.keycloak.protocol.oidc.tokenexchange.StandardTokenExchangeProvider
checkRequestedAudiences, exchangeClientToOIDCClient, exchangeClientToSAML2Client, getRequestedScope, validateAudience, validateConsents
Methods inherited from class org.keycloak.protocol.oidc.tokenexchange.AbstractTokenExchangeProvider
close, createSessionModel, exchange, exchangeClientToClient, exchangeToIdentityProvider, forbiddenIfClientIsNotTokenHolder, forbiddenIfClientIsNotWithinTokenAudience, getSubjectIssuer, getTargetAudienceClients, importUserFromExternalIdentity, isExternalInternalTokenExchangeRequest, locateExchangeExternalTokenByAlias, setClientToContext, updateUserSessionFromClientAuth
-
Constructor Details
-
ExternalToInternalTokenExchangeProvider
public ExternalToInternalTokenExchangeProvider()
-
-
Method Details
-
supports
Description copied from interface:TokenExchangeProvider
Check if exchange request is supported by this provider- Specified by:
supports
in interfaceTokenExchangeProvider
- Overrides:
supports
in classStandardTokenExchangeProvider
- Parameters:
context
- token exchange context- Returns:
- true if the request is supported
-
getVersion
public int getVersion()- Specified by:
getVersion
in interfaceTokenExchangeProvider
- Overrides:
getVersion
in classStandardTokenExchangeProvider
- 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
-
tokenExchange
protected jakarta.ws.rs.core.Response tokenExchange()- Overrides:
tokenExchange
in classStandardTokenExchangeProvider
-
getSupportedOAuthResponseTokenTypes
- Overrides:
getSupportedOAuthResponseTokenTypes
in classStandardTokenExchangeProvider
-
getRequestedTokenType
- Overrides:
getRequestedTokenType
in classStandardTokenExchangeProvider
-
exchangeExternalToken
protected jakarta.ws.rs.core.Response exchangeExternalToken(String subjectIssuer, String subjectToken) - Overrides:
exchangeExternalToken
in classAbstractTokenExchangeProvider
-