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 SummaryFields Modifier and Type Field Description static StringAPP_INITIATED_FLOWprotected AuthenticationManagerauthManagerprotected ClientConnectionclientConnectionprotected EventBuildereventprotected javax.ws.rs.core.HttpHeadersheadersprotected HttpRequesthttpRequestprotected RealmModelrealmprotected KeycloakSessionsession
 - 
Constructor SummaryConstructors Constructor Description AuthorizationEndpointBase(KeycloakSession session, EventBuilder event)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckRealm()protected voidcheckSsl()protected AuthenticationSessionModelcreateAuthenticationSession(ClientModel client, String requestState)protected AuthenticationProcessorcreateProcessor(AuthenticationSessionModel authSession, String flowId, String flowPath)protected AuthenticationFlowModelgetAuthenticationFlow(AuthenticationSessionModel authSession)protected javax.ws.rs.core.ResponsehandleBrowserAuthenticationRequest(AuthenticationSessionModel authSession, LoginProtocol protocol, boolean isPassive, boolean redirectToAuthentication)Common method to handle browser authentication request in protocols unified way.
 
- 
- 
- 
Field Detail- 
APP_INITIATED_FLOWpublic static final String APP_INITIATED_FLOW - See Also:
- Constant Field Values
 
 - 
realmprotected final RealmModel realm 
 - 
eventprotected final EventBuilder event 
 - 
authManagerprotected AuthenticationManager authManager 
 - 
headersprotected final javax.ws.rs.core.HttpHeaders headers 
 - 
httpRequestprotected final HttpRequest httpRequest 
 - 
sessionprotected final KeycloakSession session 
 - 
clientConnectionprotected final ClientConnection clientConnection 
 
- 
 - 
Constructor Detail- 
AuthorizationEndpointBasepublic AuthorizationEndpointBase(KeycloakSession session, EventBuilder event) 
 
- 
 - 
Method Detail- 
createProcessorprotected AuthenticationProcessor createProcessor(AuthenticationSessionModel authSession, String flowId, String flowPath) 
 - 
handleBrowserAuthenticationRequestprotected javax.ws.rs.core.Response handleBrowserAuthenticationRequest(AuthenticationSessionModel authSession, LoginProtocol protocol, boolean isPassive, boolean redirectToAuthentication) Common method to handle browser authentication request in protocols unified way.- Parameters:
- authSession- for current request
- protocol- handler for protocol used to initiate login
- isPassive- 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
 
 - 
getAuthenticationFlowprotected AuthenticationFlowModel getAuthenticationFlow(AuthenticationSessionModel authSession) 
 - 
checkSslprotected void checkSsl() 
 - 
checkRealmprotected void checkRealm() 
 - 
createAuthenticationSessionprotected AuthenticationSessionModel createAuthenticationSession(ClientModel client, String requestState) 
 
- 
 
-