Package org.keycloak.protocol
Class AuthorizationEndpointBase
- java.lang.Object
-
- org.keycloak.protocol.AuthorizationEndpointBase
-
- Direct Known Subclasses:
AuthorizationEndpoint,DeviceEndpoint,DockerEndpoint,SamlService
public abstract class AuthorizationEndpointBase extends Object
Common base class for Authorization REST endpoints implementation, which have to be implemented by each protocol.- Author:
- Vlastimil Elias (velias at redhat dot com)
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPP_INITIATED_FLOWprotected AuthenticationManagerauthManagerprotected org.keycloak.common.ClientConnectionclientConnectionprotected org.keycloak.events.EventBuildereventprotected javax.ws.rs.core.HttpHeadersheadersprotected org.jboss.resteasy.spi.HttpRequesthttpRequestprotected org.keycloak.models.RealmModelrealmprotected org.keycloak.models.KeycloakSessionsession
-
Constructor Summary
Constructors Constructor Description AuthorizationEndpointBase(org.keycloak.models.RealmModel realm, org.keycloak.events.EventBuilder event)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckRealm()protected voidcheckSsl()protected org.keycloak.sessions.AuthenticationSessionModelcreateAuthenticationSession(org.keycloak.models.ClientModel client, String requestState)protected AuthenticationProcessorcreateProcessor(org.keycloak.sessions.AuthenticationSessionModel authSession, String flowId, String flowPath)protected org.keycloak.models.AuthenticationFlowModelgetAuthenticationFlow(org.keycloak.sessions.AuthenticationSessionModel authSession)protected javax.ws.rs.core.ResponsehandleBrowserAuthenticationRequest(org.keycloak.sessions.AuthenticationSessionModel authSession, org.keycloak.protocol.LoginProtocol protocol, boolean isPassive, boolean redirectToAuthentication)Common method to handle browser authentication request in protocols unified way.
-
-
-
Field Detail
-
APP_INITIATED_FLOW
public static final String APP_INITIATED_FLOW
- See Also:
- Constant Field Values
-
realm
protected org.keycloak.models.RealmModel realm
-
event
protected org.keycloak.events.EventBuilder event
-
authManager
protected AuthenticationManager authManager
-
headers
@Context protected javax.ws.rs.core.HttpHeaders headers
-
httpRequest
@Context protected org.jboss.resteasy.spi.HttpRequest httpRequest
-
session
@Context protected org.keycloak.models.KeycloakSession session
-
clientConnection
@Context protected org.keycloak.common.ClientConnection clientConnection
-
-
Method Detail
-
createProcessor
protected AuthenticationProcessor createProcessor(org.keycloak.sessions.AuthenticationSessionModel authSession, String flowId, String flowPath)
-
handleBrowserAuthenticationRequest
protected javax.ws.rs.core.Response handleBrowserAuthenticationRequest(org.keycloak.sessions.AuthenticationSessionModel authSession, org.keycloak.protocol.LoginProtocol protocol, boolean isPassive, boolean redirectToAuthentication)Common method to handle browser authentication request in protocols unified way.- Parameters:
authSession- for current requestprotocol- handler for protocol used to initiate loginisPassive- set to true if login should be passive (without login screen shown)redirectToAuthentication- if true redirect to flow url. If initial call to protocol is a POST, you probably want to do this. This is so we can disable the back button on browser- Returns:
- response to be returned to the browser
-
getAuthenticationFlow
protected org.keycloak.models.AuthenticationFlowModel getAuthenticationFlow(org.keycloak.sessions.AuthenticationSessionModel authSession)
-
checkSsl
protected void checkSsl()
-
checkRealm
protected void checkRealm()
-
createAuthenticationSession
protected org.keycloak.sessions.AuthenticationSessionModel createAuthenticationSession(org.keycloak.models.ClientModel client, String requestState)
-
-