public class LoginActionsService extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTHENTICATE_PATH |
static String |
FIRST_BROKER_LOGIN_PATH |
static String |
FORWARDED_ERROR_MESSAGE_NOTE |
protected javax.ws.rs.core.HttpHeaders |
headers |
static String |
POST_BROKER_LOGIN_PATH |
protected javax.ws.rs.ext.Providers |
providers |
static String |
REGISTRATION_PATH |
static String |
REQUIRED_ACTION |
static String |
RESET_CREDENTIALS_PATH |
static String |
RESTART_PATH |
protected KeycloakSession |
session |
| Constructor and Description |
|---|
LoginActionsService(RealmModel realm,
EventBuilder event) |
| Modifier and Type | Method and Description |
|---|---|
static javax.ws.rs.core.UriBuilder |
actionTokenProcessor(javax.ws.rs.core.UriInfo uriInfo) |
javax.ws.rs.core.Response |
authenticate(String code,
String execution,
String clientId,
String tabId)
protocol independent login page entry point
|
javax.ws.rs.core.Response |
authenticateForm(String code,
String execution,
String clientId,
String tabId)
URL called after login page.
|
static javax.ws.rs.core.UriBuilder |
authenticationFormProcessor(javax.ws.rs.core.UriInfo uriInfo) |
protected javax.ws.rs.core.Response |
brokerLoginFlow(String code,
String execution,
String clientId,
String tabId,
String flowPath) |
javax.ws.rs.core.Response |
executeActionToken(String key,
String execution,
String clientId,
String tabId)
Handles a given token using the given token handler.
|
javax.ws.rs.core.Response |
firstBrokerLoginGet(String code,
String execution,
String clientId,
String tabId) |
javax.ws.rs.core.Response |
firstBrokerLoginPost(String code,
String execution,
String clientId,
String tabId) |
static javax.ws.rs.core.UriBuilder |
firstBrokerLoginProcessor(javax.ws.rs.core.UriInfo uriInfo) |
protected URI |
getLastExecutionUrl(String flowPath,
String executionId,
String clientId,
String tabId) |
protected <T extends JsonWebToken & ActionTokenKeyModel> |
handleActionToken(String tokenString,
String execution,
String clientId,
String tabId) |
static javax.ws.rs.core.UriBuilder |
loginActionsBaseUrl(javax.ws.rs.core.UriBuilder baseUriBuilder) |
static javax.ws.rs.core.UriBuilder |
loginActionsBaseUrl(javax.ws.rs.core.UriInfo uriInfo) |
javax.ws.rs.core.Response |
postBrokerLoginGet(String code,
String execution,
String clientId,
String tabId) |
javax.ws.rs.core.Response |
postBrokerLoginPost(String code,
String execution,
String clientId,
String tabId) |
static javax.ws.rs.core.UriBuilder |
postBrokerLoginProcessor(javax.ws.rs.core.UriInfo uriInfo) |
protected javax.ws.rs.core.Response |
processAuthentication(boolean action,
String execution,
AuthenticationSessionModel authSession,
String errorMessage) |
javax.ws.rs.core.Response |
processConsent(javax.ws.rs.core.MultivaluedMap<String,String> formData)
OAuth grant page.
|
protected javax.ws.rs.core.Response |
processFlow(boolean action,
String execution,
AuthenticationSessionModel authSession,
String flowPath,
AuthenticationFlowModel flow,
String errorMessage,
AuthenticationProcessor processor) |
javax.ws.rs.core.Response |
processRegister(String code,
String execution,
String clientId,
String tabId)
Registration
|
protected javax.ws.rs.core.Response |
processRegistration(boolean action,
String execution,
AuthenticationSessionModel authSession,
String errorMessage) |
protected javax.ws.rs.core.Response |
processResetCredentials(boolean actionRequest,
String execution,
AuthenticationSessionModel authSession,
String errorMessage) |
static javax.ws.rs.core.Response |
redirectToAfterBrokerLoginEndpoint(KeycloakSession session,
RealmModel realm,
javax.ws.rs.core.UriInfo uriInfo,
AuthenticationSessionModel authSession,
boolean firstBrokerLogin) |
javax.ws.rs.core.Response |
registerPage(String code,
String execution,
String clientId,
String tabId)
protocol independent registration page entry point
|
static javax.ws.rs.core.UriBuilder |
registrationFormProcessor(javax.ws.rs.core.UriInfo uriInfo) |
javax.ws.rs.core.Response |
requiredActionGET(String code,
String action,
String clientId,
String tabId) |
javax.ws.rs.core.Response |
requiredActionPOST(String code,
String action,
String clientId,
String tabId) |
static javax.ws.rs.core.UriBuilder |
requiredActionProcessor(javax.ws.rs.core.UriInfo uriInfo) |
protected javax.ws.rs.core.Response |
resetCredentials(String code,
String execution,
String clientId,
String tabId) |
javax.ws.rs.core.Response |
resetCredentialsGET(String code,
String execution,
String clientId,
String tabId)
Endpoint for executing reset credentials flow.
|
javax.ws.rs.core.Response |
resetCredentialsPOST(String code,
String execution,
String clientId,
String tabId,
String key) |
javax.ws.rs.core.Response |
restartSession(String clientId,
String tabId)
protocol independent page for restart of the flow
|
public static final String AUTHENTICATE_PATH
public static final String REGISTRATION_PATH
public static final String RESET_CREDENTIALS_PATH
public static final String REQUIRED_ACTION
public static final String FIRST_BROKER_LOGIN_PATH
public static final String POST_BROKER_LOGIN_PATH
public static final String RESTART_PATH
public static final String FORWARDED_ERROR_MESSAGE_NOTE
@Context protected javax.ws.rs.core.HttpHeaders headers
@Context protected javax.ws.rs.ext.Providers providers
@Context protected KeycloakSession session
public LoginActionsService(RealmModel realm, EventBuilder event)
public static javax.ws.rs.core.UriBuilder loginActionsBaseUrl(javax.ws.rs.core.UriInfo uriInfo)
public static javax.ws.rs.core.UriBuilder authenticationFormProcessor(javax.ws.rs.core.UriInfo uriInfo)
public static javax.ws.rs.core.UriBuilder requiredActionProcessor(javax.ws.rs.core.UriInfo uriInfo)
public static javax.ws.rs.core.UriBuilder actionTokenProcessor(javax.ws.rs.core.UriInfo uriInfo)
public static javax.ws.rs.core.UriBuilder registrationFormProcessor(javax.ws.rs.core.UriInfo uriInfo)
public static javax.ws.rs.core.UriBuilder firstBrokerLoginProcessor(javax.ws.rs.core.UriInfo uriInfo)
public static javax.ws.rs.core.UriBuilder postBrokerLoginProcessor(javax.ws.rs.core.UriInfo uriInfo)
public static javax.ws.rs.core.UriBuilder loginActionsBaseUrl(javax.ws.rs.core.UriBuilder baseUriBuilder)
protected URI getLastExecutionUrl(String flowPath, String executionId, String clientId, String tabId)
@Path(value="restart")
@GET
public javax.ws.rs.core.Response restartSession(@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId)
@Path(value="authenticate")
@GET
public javax.ws.rs.core.Response authenticate(@QueryParam(value="code")
String code,
@QueryParam(value="execution")
String execution,
@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId)
code - protected javax.ws.rs.core.Response processAuthentication(boolean action,
String execution,
AuthenticationSessionModel authSession,
String errorMessage)
protected javax.ws.rs.core.Response processFlow(boolean action,
String execution,
AuthenticationSessionModel authSession,
String flowPath,
AuthenticationFlowModel flow,
String errorMessage,
AuthenticationProcessor processor)
@Path(value="authenticate")
@POST
public javax.ws.rs.core.Response authenticateForm(@QueryParam(value="code")
String code,
@QueryParam(value="execution")
String execution,
@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId)
code - @Path(value="reset-credentials")
@POST
public javax.ws.rs.core.Response resetCredentialsPOST(@QueryParam(value="code")
String code,
@QueryParam(value="execution")
String execution,
@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId,
@QueryParam(value="key")
String key)
@Path(value="reset-credentials")
@GET
public javax.ws.rs.core.Response resetCredentialsGET(@QueryParam(value="code")
String code,
@QueryParam(value="execution")
String execution,
@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId)
code - execution - protected javax.ws.rs.core.Response resetCredentials(String code, String execution, String clientId, String tabId)
code - execution - @Path(value="action-token")
@GET
public javax.ws.rs.core.Response executeActionToken(@QueryParam(value="key")
String key,
@QueryParam(value="execution")
String execution,
@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId)
VerificationException thrown
in the handler, it is handled automatically here to reduce boilerplate code.key - execution - protected <T extends JsonWebToken & ActionTokenKeyModel> javax.ws.rs.core.Response handleActionToken(String tokenString, String execution, String clientId, String tabId)
protected javax.ws.rs.core.Response processResetCredentials(boolean actionRequest,
String execution,
AuthenticationSessionModel authSession,
String errorMessage)
protected javax.ws.rs.core.Response processRegistration(boolean action,
String execution,
AuthenticationSessionModel authSession,
String errorMessage)
@Path(value="registration")
@GET
public javax.ws.rs.core.Response registerPage(@QueryParam(value="code")
String code,
@QueryParam(value="execution")
String execution,
@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId)
code - @Path(value="registration")
@POST
public javax.ws.rs.core.Response processRegister(@QueryParam(value="code")
String code,
@QueryParam(value="execution")
String execution,
@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId)
code - @Path(value="first-broker-login")
@GET
public javax.ws.rs.core.Response firstBrokerLoginGet(@QueryParam(value="code")
String code,
@QueryParam(value="execution")
String execution,
@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId)
@Path(value="first-broker-login")
@POST
public javax.ws.rs.core.Response firstBrokerLoginPost(@QueryParam(value="code")
String code,
@QueryParam(value="execution")
String execution,
@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId)
@Path(value="post-broker-login")
@GET
public javax.ws.rs.core.Response postBrokerLoginGet(@QueryParam(value="code")
String code,
@QueryParam(value="execution")
String execution,
@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId)
@Path(value="post-broker-login")
@POST
public javax.ws.rs.core.Response postBrokerLoginPost(@QueryParam(value="code")
String code,
@QueryParam(value="execution")
String execution,
@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId)
protected javax.ws.rs.core.Response brokerLoginFlow(String code, String execution, String clientId, String tabId, String flowPath)
public static javax.ws.rs.core.Response redirectToAfterBrokerLoginEndpoint(KeycloakSession session, RealmModel realm, javax.ws.rs.core.UriInfo uriInfo, AuthenticationSessionModel authSession, boolean firstBrokerLogin)
@Path(value="consent") @POST @Consumes(value="application/x-www-form-urlencoded") public javax.ws.rs.core.Response processConsent(javax.ws.rs.core.MultivaluedMap<String,String> formData)
formData - @Path(value="required-action")
@POST
public javax.ws.rs.core.Response requiredActionPOST(@QueryParam(value="code")
String code,
@QueryParam(value="execution")
String action,
@QueryParam(value="client_id")
String clientId,
@QueryParam(value="tab_id")
String tabId)
Copyright © 2017 JBoss by Red Hat. All rights reserved.