Package org.keycloak.protocol.oidc
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 Summary
Constructors Constructor Description DefaultTokenExchangeProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
javax.ws.rs.core.Response
exchange(TokenExchangeContext context)
Exchange thetoken
.protected javax.ws.rs.core.Response
exchangeClientToClient(UserModel targetUser, UserSessionModel targetUserSession, AccessToken token, boolean disallowOnHolderOfTokenMismatch)
protected javax.ws.rs.core.Response
exchangeClientToOIDCClient(UserModel targetUser, UserSessionModel targetUserSession, String requestedTokenType, ClientModel targetClient, String audience, String scope)
protected javax.ws.rs.core.Response
exchangeClientToSAML2Client(UserModel targetUser, UserSessionModel targetUserSession, String requestedTokenType, ClientModel targetClient)
protected javax.ws.rs.core.Response
exchangeExternalToken(String issuer, String subjectToken)
protected javax.ws.rs.core.Response
exchangeToIdentityProvider(UserModel targetUser, UserSessionModel targetUserSession, String requestedIssuer)
protected UserModel
importUserFromExternalIdentity(BrokeredIdentityContext context)
boolean
supports(TokenExchangeContext context)
Check if exchange request is supported by this providerprotected javax.ws.rs.core.Response
tokenExchange()
-
-
-
Method Detail
-
supports
public boolean supports(TokenExchangeContext context)
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
public javax.ws.rs.core.Response exchange(TokenExchangeContext context)
Description copied from interface:TokenExchangeProvider
Exchange thetoken
.- Specified by:
exchange
in interfaceTokenExchangeProvider
- Returns:
- response with a new token
-
tokenExchange
protected javax.ws.rs.core.Response tokenExchange()
-
exchangeToIdentityProvider
protected javax.ws.rs.core.Response exchangeToIdentityProvider(UserModel targetUser, UserSessionModel targetUserSession, String requestedIssuer)
-
exchangeClientToClient
protected javax.ws.rs.core.Response exchangeClientToClient(UserModel targetUser, UserSessionModel targetUserSession, AccessToken token, boolean disallowOnHolderOfTokenMismatch)
-
exchangeClientToOIDCClient
protected javax.ws.rs.core.Response exchangeClientToOIDCClient(UserModel targetUser, UserSessionModel targetUserSession, String requestedTokenType, ClientModel targetClient, String audience, String scope)
-
exchangeClientToSAML2Client
protected javax.ws.rs.core.Response exchangeClientToSAML2Client(UserModel targetUser, UserSessionModel targetUserSession, String requestedTokenType, ClientModel targetClient)
-
exchangeExternalToken
protected javax.ws.rs.core.Response exchangeExternalToken(String issuer, String subjectToken)
-
importUserFromExternalIdentity
protected UserModel importUserFromExternalIdentity(BrokeredIdentityContext context)
-
-