Package org.keycloak.authentication
Class RequiredActionContextResult
- java.lang.Object
- 
- org.keycloak.authentication.RequiredActionContextResult
 
- 
- All Implemented Interfaces:
- RequiredActionContext
 
 public class RequiredActionContextResult extends Object implements RequiredActionContext - Version:
- $Revision: 1 $
- Author:
- Bill Burke
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.keycloak.authentication.RequiredActionContextRequiredActionContext.KcActionStatus, RequiredActionContext.Status
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected AuthenticationSessionModelauthenticationSessionprotected javax.ws.rs.core.Responsechallengeprotected EventBuildereventBuilderprotected RequiredActionFactoryfactoryprotected HttpRequesthttpRequestprotected RealmModelrealmprotected KeycloakSessionsessionprotected RequiredActionContext.Statusstatusprotected UserModeluser
 - 
Constructor SummaryConstructors Constructor Description RequiredActionContextResult(AuthenticationSessionModel authSession, RealmModel realm, EventBuilder eventBuilder, KeycloakSession session, HttpRequest httpRequest, UserModel user, RequiredActionFactory factory)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchallenge(javax.ws.rs.core.Response response)Send a challenge Response back to uservoidfailure()Abort the authentication with an errorLoginFormsProviderform()Create a Freemarker form builder that presets the user, action URI, and a generated access codeStringgenerateCode()Generates access code and updates clientsession timestamp Access codes must be included in form action callbacks as a query parameter.URIgetActionUrl()Get the action URL for the required action.URIgetActionUrl(String code)Get the action URL for the required action.AuthenticationSessionModelgetAuthenticationSession()javax.ws.rs.core.ResponsegetChallenge()If challenge has been sent this returns the JAX-RS ResponseClientConnectiongetConnection()EventBuildergetEvent()Current event builder being usedRequiredActionFactorygetFactory()HttpRequestgetHttpRequest()RealmModelgetRealm()KeycloakSessiongetSession()RequiredActionContext.StatusgetStatus()javax.ws.rs.core.UriInfogetUriInfo()UserModelgetUser()Current uservoidignore()Ignore this required action and go onto the next, or complete the flow.voidsuccess()Mark this required action as successful.
 
- 
- 
- 
Field Detail- 
authenticationSessionprotected AuthenticationSessionModel authenticationSession 
 - 
realmprotected RealmModel realm 
 - 
eventBuilderprotected EventBuilder eventBuilder 
 - 
sessionprotected KeycloakSession session 
 - 
statusprotected RequiredActionContext.Status status 
 - 
challengeprotected javax.ws.rs.core.Response challenge 
 - 
httpRequestprotected HttpRequest httpRequest 
 - 
userprotected UserModel user 
 - 
factoryprotected RequiredActionFactory factory 
 
- 
 - 
Constructor Detail- 
RequiredActionContextResultpublic RequiredActionContextResult(AuthenticationSessionModel authSession, RealmModel realm, EventBuilder eventBuilder, KeycloakSession session, HttpRequest httpRequest, UserModel user, RequiredActionFactory factory) 
 
- 
 - 
Method Detail- 
getFactorypublic RequiredActionFactory getFactory() 
 - 
getEventpublic EventBuilder getEvent() Description copied from interface:RequiredActionContextCurrent event builder being used- Specified by:
- getEventin interface- RequiredActionContext
- Returns:
 
 - 
getUserpublic UserModel getUser() Description copied from interface:RequiredActionContextCurrent user- Specified by:
- getUserin interface- RequiredActionContext
- Returns:
 
 - 
getRealmpublic RealmModel getRealm() - Specified by:
- getRealmin interface- RequiredActionContext
 
 - 
getAuthenticationSessionpublic AuthenticationSessionModel getAuthenticationSession() - Specified by:
- getAuthenticationSessionin interface- RequiredActionContext
 
 - 
getConnectionpublic ClientConnection getConnection() - Specified by:
- getConnectionin interface- RequiredActionContext
 
 - 
getUriInfopublic javax.ws.rs.core.UriInfo getUriInfo() - Specified by:
- getUriInfoin interface- RequiredActionContext
 
 - 
getSessionpublic KeycloakSession getSession() - Specified by:
- getSessionin interface- RequiredActionContext
 
 - 
getHttpRequestpublic HttpRequest getHttpRequest() - Specified by:
- getHttpRequestin interface- RequiredActionContext
 
 - 
getStatuspublic RequiredActionContext.Status getStatus() - Specified by:
- getStatusin interface- RequiredActionContext
 
 - 
challengepublic void challenge(javax.ws.rs.core.Response response) Description copied from interface:RequiredActionContextSend a challenge Response back to user- Specified by:
- challengein interface- RequiredActionContext
 
 - 
failurepublic void failure() Description copied from interface:RequiredActionContextAbort the authentication with an error- Specified by:
- failurein interface- RequiredActionContext
 
 - 
successpublic void success() Description copied from interface:RequiredActionContextMark this required action as successful. The required action will be removed from the UserModel- Specified by:
- successin interface- RequiredActionContext
 
 - 
ignorepublic void ignore() Description copied from interface:RequiredActionContextIgnore this required action and go onto the next, or complete the flow.- Specified by:
- ignorein interface- RequiredActionContext
 
 - 
getActionUrlpublic URI getActionUrl(String code) Description copied from interface:RequiredActionContextGet the action URL for the required action.- Specified by:
- getActionUrlin interface- RequiredActionContext
- Parameters:
- code- client sessino access code
- Returns:
 
 - 
generateCodepublic String generateCode() Description copied from interface:RequiredActionContextGenerates access code and updates clientsession timestamp Access codes must be included in form action callbacks as a query parameter.- Specified by:
- generateCodein interface- RequiredActionContext
- Returns:
 
 - 
getActionUrlpublic URI getActionUrl() Description copied from interface:RequiredActionContextGet the action URL for the required action. This auto-generates the access code.- Specified by:
- getActionUrlin interface- RequiredActionContext
- Returns:
 
 - 
formpublic LoginFormsProvider form() Description copied from interface:RequiredActionContextCreate a Freemarker form builder that presets the user, action URI, and a generated access code- Specified by:
- formin interface- RequiredActionContext
- Returns:
 
 - 
getChallengepublic javax.ws.rs.core.Response getChallenge() Description copied from interface:RequiredActionContextIf challenge has been sent this returns the JAX-RS Response- Specified by:
- getChallengein interface- RequiredActionContext
- Returns:
 
 
- 
 
-