Class OAuth2GrantTypeBase
java.lang.Object
org.keycloak.protocol.oidc.grants.OAuth2GrantTypeBase
- All Implemented Interfaces:
OAuth2GrantType
,Provider
- Direct Known Subclasses:
AuthorizationCodeGrantType
,CibaGrantType
,ClientCredentialsGrantType
,DeviceGrantType
,PermissionGrantType
,RefreshTokenGrantType
,ResourceOwnerPasswordCredentialsGrantType
,TokenExchangeGrantType
Base class for OAuth 2.0 grant types
- Author:
- Dmitry Telegin (et al.)
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.protocol.oidc.grants.OAuth2GrantType
OAuth2GrantType.Context
-
Field Summary
Modifier and TypeFieldDescriptionprotected ClientModel
protected OIDCAdvancedConfigWrapper
protected ClientConnection
protected OAuth2GrantType.Context
protected Cors
protected DPoP
protected EventBuilder
protected jakarta.ws.rs.core.HttpHeaders
protected RealmModel
protected HttpRequest
protected HttpResponse
protected KeycloakSession
protected TokenManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkAndBindDPoPToken
(TokenManager.AccessTokenResponseBuilder responseBuilder, boolean useRefreshToken, boolean isDPoPSupported) protected void
checkAndBindMtlsHoKToken
(TokenManager.AccessTokenResponseBuilder responseBuilder, boolean useRefreshToken) protected void
checkAndRetrieveDPoPProof
(boolean isDPoPSupported) protected void
void
close()
protected jakarta.ws.rs.core.Response
createTokenResponse
(UserModel user, UserSessionModel userSession, ClientSessionContext clientSessionCtx, String scopeParam, boolean code, Function<TokenManager.AccessTokenResponseBuilder, ClientPolicyContext> clientPolicyContextGenerator) protected String
protected void
setContext
(OAuth2GrantType.Context context) protected void
updateClientSession
(AuthenticatedClientSessionModel clientSession) protected void
updateUserSessionFromClientAuth
(UserSessionModel userSession) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.protocol.oidc.grants.OAuth2GrantType
getEventType, process
-
Field Details
-
context
-
session
-
realm
-
client
-
clientConfig
-
clientConnection
-
clientAuthAttributes
-
formParams
-
event
-
cors
-
tokenManager
-
dPoP
-
request
-
response
-
headers
protected jakarta.ws.rs.core.HttpHeaders headers
-
-
Constructor Details
-
OAuth2GrantTypeBase
public OAuth2GrantTypeBase()
-
-
Method Details
-
setContext
-
createTokenResponse
protected jakarta.ws.rs.core.Response createTokenResponse(UserModel user, UserSessionModel userSession, ClientSessionContext clientSessionCtx, String scopeParam, boolean code, Function<TokenManager.AccessTokenResponseBuilder, ClientPolicyContext> clientPolicyContextGenerator) -
checkAndBindMtlsHoKToken
protected void checkAndBindMtlsHoKToken(TokenManager.AccessTokenResponseBuilder responseBuilder, boolean useRefreshToken) -
checkAndBindDPoPToken
protected void checkAndBindDPoPToken(TokenManager.AccessTokenResponseBuilder responseBuilder, boolean useRefreshToken, boolean isDPoPSupported) -
updateClientSession
-
updateUserSessionFromClientAuth
-
checkAndRetrieveDPoPProof
protected void checkAndRetrieveDPoPProof(boolean isDPoPSupported) -
getRequestedScopes
-
checkClient
protected void checkClient() -
close
public void close()
-