Package org.keycloak.protocol.oidc
Class OIDCLoginProtocol
- java.lang.Object
- 
- org.keycloak.protocol.oidc.OIDCLoginProtocol
 
- 
- All Implemented Interfaces:
- LoginProtocol,- Provider
 
 public class OIDCLoginProtocol extends Object implements LoginProtocol - Author:
- Bill Burke, Stian Thorgersen
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.keycloak.protocol.LoginProtocolLoginProtocol.Error
 
- 
 - 
Field Summary
 - 
Constructor SummaryConstructors Constructor Description OIDCLoginProtocol()OIDCLoginProtocol(KeycloakSession session, RealmModel realm, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders headers, EventBuilder event)
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
LOGIN_PROTOCOLpublic static final String LOGIN_PROTOCOL - See Also:
- Constant Field Values
 
 - 
STATE_PARAMpublic static final String STATE_PARAM - See Also:
- Constant Field Values
 
 - 
SCOPE_PARAMpublic static final String SCOPE_PARAM - See Also:
- Constant Field Values
 
 - 
CODE_PARAMpublic static final String CODE_PARAM - See Also:
- Constant Field Values
 
 - 
RESPONSE_TYPE_PARAMpublic static final String RESPONSE_TYPE_PARAM - See Also:
- Constant Field Values
 
 - 
GRANT_TYPE_PARAMpublic static final String GRANT_TYPE_PARAM - See Also:
- Constant Field Values
 
 - 
REDIRECT_URI_PARAMpublic static final String REDIRECT_URI_PARAM - See Also:
- Constant Field Values
 
 - 
POST_LOGOUT_REDIRECT_URI_PARAMpublic static final String POST_LOGOUT_REDIRECT_URI_PARAM - See Also:
- Constant Field Values
 
 - 
CLIENT_ID_PARAMpublic static final String CLIENT_ID_PARAM - See Also:
- Constant Field Values
 
 - 
NONCE_PARAMpublic static final String NONCE_PARAM - See Also:
- Constant Field Values
 
 - 
MAX_AGE_PARAMpublic static final String MAX_AGE_PARAM - See Also:
- Constant Field Values
 
 - 
PROMPT_PARAMpublic static final String PROMPT_PARAM - See Also:
- Constant Field Values
 
 - 
LOGIN_HINT_PARAMpublic static final String LOGIN_HINT_PARAM - See Also:
- Constant Field Values
 
 - 
REQUEST_PARAMpublic static final String REQUEST_PARAM - See Also:
- Constant Field Values
 
 - 
REQUEST_URI_PARAMpublic static final String REQUEST_URI_PARAM - See Also:
- Constant Field Values
 
 - 
UI_LOCALES_PARAMpublic static final String UI_LOCALES_PARAM - See Also:
- Constant Field Values
 
 - 
CLAIMS_PARAMpublic static final String CLAIMS_PARAM - See Also:
- Constant Field Values
 
 - 
ACR_PARAMpublic static final String ACR_PARAM - See Also:
- Constant Field Values
 
 - 
ID_TOKEN_HINTpublic static final String ID_TOKEN_HINT - See Also:
- Constant Field Values
 
 - 
LOGOUT_STATE_PARAMpublic static final String LOGOUT_STATE_PARAM - See Also:
- Constant Field Values
 
 - 
LOGOUT_REDIRECT_URIpublic static final String LOGOUT_REDIRECT_URI - See Also:
- Constant Field Values
 
 - 
LOGOUT_VALIDATED_ID_TOKEN_SESSION_STATEpublic static final String LOGOUT_VALIDATED_ID_TOKEN_SESSION_STATE - See Also:
- Constant Field Values
 
 - 
LOGOUT_VALIDATED_ID_TOKEN_ISSUED_ATpublic static final String LOGOUT_VALIDATED_ID_TOKEN_ISSUED_AT - See Also:
- Constant Field Values
 
 - 
ISSUERpublic static final String ISSUER - See Also:
- Constant Field Values
 
 - 
RESPONSE_MODE_PARAMpublic static final String RESPONSE_MODE_PARAM - See Also:
- Constant Field Values
 
 - 
PROMPT_VALUE_NONEpublic static final String PROMPT_VALUE_NONE - See Also:
- Constant Field Values
 
 - 
PROMPT_VALUE_LOGINpublic static final String PROMPT_VALUE_LOGIN - See Also:
- Constant Field Values
 
 - 
PROMPT_VALUE_CONSENTpublic static final String PROMPT_VALUE_CONSENT - See Also:
- Constant Field Values
 
 - 
PROMPT_VALUE_SELECT_ACCOUNTpublic static final String PROMPT_VALUE_SELECT_ACCOUNT - See Also:
- Constant Field Values
 
 - 
CLIENT_SECRET_BASICpublic static final String CLIENT_SECRET_BASIC - See Also:
- Constant Field Values
 
 - 
CLIENT_SECRET_POSTpublic static final String CLIENT_SECRET_POST - See Also:
- Constant Field Values
 
 - 
CLIENT_SECRET_JWTpublic static final String CLIENT_SECRET_JWT - See Also:
- Constant Field Values
 
 - 
PRIVATE_KEY_JWTpublic static final String PRIVATE_KEY_JWT - See Also:
- Constant Field Values
 
 - 
TLS_CLIENT_AUTHpublic static final String TLS_CLIENT_AUTH - See Also:
- Constant Field Values
 
 - 
CODE_CHALLENGE_PARAMpublic static final String CODE_CHALLENGE_PARAM - See Also:
- Constant Field Values
 
 - 
CODE_CHALLENGE_METHOD_PARAMpublic static final String CODE_CHALLENGE_METHOD_PARAM - See Also:
- Constant Field Values
 
 - 
PKCE_CODE_CHALLENGE_MIN_LENGTHpublic static final int PKCE_CODE_CHALLENGE_MIN_LENGTH - See Also:
- Constant Field Values
 
 - 
PKCE_CODE_CHALLENGE_MAX_LENGTHpublic static final int PKCE_CODE_CHALLENGE_MAX_LENGTH - See Also:
- Constant Field Values
 
 - 
PKCE_CODE_VERIFIER_MIN_LENGTHpublic static final int PKCE_CODE_VERIFIER_MIN_LENGTH - See Also:
- Constant Field Values
 
 - 
PKCE_CODE_VERIFIER_MAX_LENGTHpublic static final int PKCE_CODE_VERIFIER_MAX_LENGTH - See Also:
- Constant Field Values
 
 - 
PKCE_METHOD_PLAINpublic static final String PKCE_METHOD_PLAIN - See Also:
- Constant Field Values
 
 - 
PKCE_METHOD_S256public static final String PKCE_METHOD_S256 - See Also:
- Constant Field Values
 
 - 
sessionprotected KeycloakSession session 
 - 
realmprotected RealmModel realm 
 - 
uriInfoprotected javax.ws.rs.core.UriInfo uriInfo 
 - 
headersprotected javax.ws.rs.core.HttpHeaders headers 
 - 
eventprotected EventBuilder event 
 - 
responseTypeprotected OIDCResponseType responseType 
 - 
responseModeprotected OIDCResponseMode responseMode 
 
- 
 - 
Constructor Detail- 
OIDCLoginProtocolpublic OIDCLoginProtocol(KeycloakSession session, RealmModel realm, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders headers, EventBuilder event) 
 - 
OIDCLoginProtocolpublic OIDCLoginProtocol() 
 
- 
 - 
Method Detail- 
setSessionpublic OIDCLoginProtocol setSession(KeycloakSession session) - Specified by:
- setSessionin interface- LoginProtocol
 
 - 
setRealmpublic OIDCLoginProtocol setRealm(RealmModel realm) - Specified by:
- setRealmin interface- LoginProtocol
 
 - 
setUriInfopublic OIDCLoginProtocol setUriInfo(javax.ws.rs.core.UriInfo uriInfo) - Specified by:
- setUriInfoin interface- LoginProtocol
 
 - 
setHttpHeaderspublic OIDCLoginProtocol setHttpHeaders(javax.ws.rs.core.HttpHeaders headers) - Specified by:
- setHttpHeadersin interface- LoginProtocol
 
 - 
setEventBuilderpublic OIDCLoginProtocol setEventBuilder(EventBuilder event) - Specified by:
- setEventBuilderin interface- LoginProtocol
 
 - 
authenticatedpublic javax.ws.rs.core.Response authenticated(AuthenticationSessionModel authSession, UserSessionModel userSession, ClientSessionContext clientSessionCtx) - Specified by:
- authenticatedin interface- LoginProtocol
 
 - 
sendErrorpublic javax.ws.rs.core.Response sendError(AuthenticationSessionModel authSession, LoginProtocol.Error error) - Specified by:
- sendErrorin interface- LoginProtocol
 
 - 
backchannelLogoutpublic javax.ws.rs.core.Response backchannelLogout(UserSessionModel userSession, AuthenticatedClientSessionModel clientSession) - Specified by:
- backchannelLogoutin interface- LoginProtocol
 
 - 
frontchannelLogoutpublic javax.ws.rs.core.Response frontchannelLogout(UserSessionModel userSession, AuthenticatedClientSessionModel clientSession) - Specified by:
- frontchannelLogoutin interface- LoginProtocol
 
 - 
finishBrowserLogoutpublic javax.ws.rs.core.Response finishBrowserLogout(UserSessionModel userSession, AuthenticationSessionModel logoutSession) Description copied from interface:LoginProtocolThis method is called when browser logout is going to be finished. It is not triggered during backchannel logout- Specified by:
- finishBrowserLogoutin interface- LoginProtocol
- Parameters:
- userSession- user session, which was logged out
- logoutSession- authentication session, which was used during logout to track the logout state
- Returns:
- response to be sent to the client
 
 - 
requireReauthenticationpublic boolean requireReauthentication(UserSessionModel userSession, AuthenticationSessionModel authSession) - Specified by:
- requireReauthenticationin interface- LoginProtocol
- Returns:
- true if SSO cookie authentication can't be used. User will need to "actively" reauthenticate
 
 - 
isPromptLoginprotected boolean isPromptLogin(AuthenticationSessionModel authSession) 
 - 
isAuthTimeExpiredprotected boolean isAuthTimeExpired(UserSessionModel userSession, AuthenticationSessionModel authSession) 
 - 
isReAuthRequiredForKcActionprotected boolean isReAuthRequiredForKcAction(UserSessionModel userSession, AuthenticationSessionModel authSession) 
 - 
sendPushRevocationPolicyRequestpublic boolean sendPushRevocationPolicyRequest(RealmModel realm, ClientModel resource, int notBefore, String managementUrl) Description copied from interface:LoginProtocolSend not-before revocation policy to the given client.- Specified by:
- sendPushRevocationPolicyRequestin interface- LoginProtocol
- Returns:
- trueif revocation policy was successfully updated at the client,- falseotherwise.
 
 
- 
 
-