org.keycloak.services.resources

## Class LoginActionsService

- java.lang.Object
- - org.keycloak.services.resources.LoginActionsService

-     public class LoginActionsService
      extends Object

  Author:
    Stian Thorgersen

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ACTION_COOKIE`
    `static String` | `AUTHENTICATE_PATH`
    `static String` | `FIRST_BROKER_LOGIN_PATH`
    `protected javax.ws.rs.core.HttpHeaders` | `headers`
    `protected static ServicesLogger` | `logger`
    `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`
    `protected KeycloakSession` | `session`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LoginActionsService(RealmModel realm, EventBuilder event)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `authenticate(String code, String execution)` protocol independent login page entry point
    `javax.ws.rs.core.Response` | `authenticateForm(String code, String execution)` 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, boolean firstBrokerLogin)`
    `static void` | `createActionCookie(RealmModel realm, javax.ws.rs.core.UriInfo uriInfo, ClientConnection clientConnection, String sessionId)`
    `javax.ws.rs.core.Response` | `emailVerification(String code, String key)`
    `javax.ws.rs.core.Response` | `executeActions(String key)` Initiated by admin, not the user on login
    `javax.ws.rs.core.Response` | `firstBrokerLoginGet(String code, String execution)`
    `javax.ws.rs.core.Response` | `firstBrokerLoginPost(String code, String execution)`
    `static javax.ws.rs.core.UriBuilder` | `firstBrokerLoginProcessor(javax.ws.rs.core.UriInfo uriInfo)`
    `static String` | `getActionCookie(javax.ws.rs.core.HttpHeaders headers, RealmModel realm, javax.ws.rs.core.UriInfo uriInfo, ClientConnection clientConnection)`
    `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)`
    `javax.ws.rs.core.Response` | `postBrokerLoginPost(String code, String execution)`
    `static javax.ws.rs.core.UriBuilder` | `postBrokerLoginProcessor(javax.ws.rs.core.UriInfo uriInfo)`
    `protected javax.ws.rs.core.Response` | `processAuthentication(String execution, ClientSessionModel clientSession, 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(String execution, ClientSessionModel clientSession, String flowPath, AuthenticationFlowModel flow, String errorMessage, AuthenticationProcessor processor)`
    `javax.ws.rs.core.Response` | `processRegister(String code, String execution)` Registration
    `protected javax.ws.rs.core.Response` | `processRegistration(String execution, ClientSessionModel clientSession, String errorMessage)`
    `javax.ws.rs.core.Response` | `processRequireAction(String code, String action)`
    `protected javax.ws.rs.core.Response` | `processResetCredentials(String execution, ClientSessionModel clientSession, String errorMessage)`
    `javax.ws.rs.core.Response` | `redirectToRequiredActions(String code)`
    `javax.ws.rs.core.Response` | `registerPage(String code, String execution)` 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)`
    `javax.ws.rs.core.Response` | `requiredActionPOST(String code, String action)`
    `static javax.ws.rs.core.UriBuilder` | `requiredActionProcessor(javax.ws.rs.core.UriInfo uriInfo)`
    `protected javax.ws.rs.core.Response` | `resetCredentials(String code, String execution)`
    `javax.ws.rs.core.Response` | `resetCredentialsGET(String code, String execution)` Endpoint for executing reset credentials flow.
    `javax.ws.rs.core.Response` | `resetCredentialsPOST(String code, String execution)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          protected static final ServicesLogger logger

    - #### ACTION_COOKIE

          public static final String ACTION_COOKIE

      See Also:
        Constant Field Values

    - #### AUTHENTICATE_PATH

          public static final String AUTHENTICATE_PATH

      See Also:
        Constant Field Values

    - #### REGISTRATION_PATH

          public static final String REGISTRATION_PATH

      See Also:
        Constant Field Values

    - #### RESET_CREDENTIALS_PATH

          public static final String RESET_CREDENTIALS_PATH

      See Also:
        Constant Field Values

    - #### REQUIRED_ACTION

          public static final String REQUIRED_ACTION

      See Also:
        Constant Field Values

    - #### FIRST_BROKER_LOGIN_PATH

          public static final String FIRST_BROKER_LOGIN_PATH

      See Also:
        Constant Field Values

    - #### POST_BROKER_LOGIN_PATH

          public static final String POST_BROKER_LOGIN_PATH

      See Also:
        Constant Field Values

    - #### headers

          @Context
          protected javax.ws.rs.core.HttpHeaders headers

    - #### providers

          @Context
          protected javax.ws.rs.ext.Providers providers

    - #### session

          @Context
          protected KeycloakSession session

  - ### Constructor Detail

    - #### LoginActionsService

          public LoginActionsService(RealmModel realm,
                                     EventBuilder event)

  - ### Method Detail

    - #### loginActionsBaseUrl

          public static javax.ws.rs.core.UriBuilder loginActionsBaseUrl(javax.ws.rs.core.UriInfo uriInfo)

    - #### authenticationFormProcessor

          public static javax.ws.rs.core.UriBuilder authenticationFormProcessor(javax.ws.rs.core.UriInfo uriInfo)

    - #### requiredActionProcessor

          public static javax.ws.rs.core.UriBuilder requiredActionProcessor(javax.ws.rs.core.UriInfo uriInfo)

    - #### registrationFormProcessor

          public static javax.ws.rs.core.UriBuilder registrationFormProcessor(javax.ws.rs.core.UriInfo uriInfo)

    - #### firstBrokerLoginProcessor

          public static javax.ws.rs.core.UriBuilder firstBrokerLoginProcessor(javax.ws.rs.core.UriInfo uriInfo)

    - #### postBrokerLoginProcessor

          public static javax.ws.rs.core.UriBuilder postBrokerLoginProcessor(javax.ws.rs.core.UriInfo uriInfo)

    - #### loginActionsBaseUrl

          public static javax.ws.rs.core.UriBuilder loginActionsBaseUrl(javax.ws.rs.core.UriBuilder baseUriBuilder)

    - #### authenticate

          @Path(value="authenticate")
           @GET
          public javax.ws.rs.core.Response authenticate(@QueryParam(value="code")
                                                                                          String code,
                                                                                          @QueryParam(value="execution")
                                                                                          String execution)

      protocol independent login page entry point
      Parameters:
        `code` -
      Returns:

    - #### processAuthentication

          protected javax.ws.rs.core.Response processAuthentication(String execution,
                                                                    ClientSessionModel clientSession,
                                                                    String errorMessage)

    - #### processFlow

          protected javax.ws.rs.core.Response processFlow(String execution,
                                                          ClientSessionModel clientSession,
                                                          String flowPath,
                                                          AuthenticationFlowModel flow,
                                                          String errorMessage,
                                                          AuthenticationProcessor processor)

    - #### authenticateForm

          @Path(value="authenticate")
           @POST
          public javax.ws.rs.core.Response authenticateForm(@QueryParam(value="code")
                                                                                               String code,
                                                                                               @QueryParam(value="execution")
                                                                                               String execution)

      URL called after login page. YOU SHOULD NEVER INVOKE THIS DIRECTLY!
      Parameters:
        `code` -
      Returns:

    - #### resetCredentialsPOST

          @Path(value="reset-credentials")
           @POST
          public javax.ws.rs.core.Response resetCredentialsPOST(@QueryParam(value="code")
                                                                                                        String code,
                                                                                                        @QueryParam(value="execution")
                                                                                                        String execution)

    - #### resetCredentialsGET

          @Path(value="reset-credentials")
           @GET
          public javax.ws.rs.core.Response resetCredentialsGET(@QueryParam(value="code")
                                                                                                      String code,
                                                                                                      @QueryParam(value="execution")
                                                                                                      String execution)

      Endpoint for executing reset credentials flow. If code is null, a client session is created with the account service as the client. Successful reset sends you to the account page. Note, account service must be enabled.
      Parameters:
        `code` -
        `execution` -
      Returns:

    - #### resetCredentials

          protected javax.ws.rs.core.Response resetCredentials(String code,
                                                               String execution)

    - #### processResetCredentials

          protected javax.ws.rs.core.Response processResetCredentials(String execution,
                                                                      ClientSessionModel clientSession,
                                                                      String errorMessage)

    - #### processRegistration

          protected javax.ws.rs.core.Response processRegistration(String execution,
                                                                  ClientSessionModel clientSession,
                                                                  String errorMessage)

    - #### registerPage

          @Path(value="registration")
           @GET
          public javax.ws.rs.core.Response registerPage(@QueryParam(value="code")
                                                                                          String code,
                                                                                          @QueryParam(value="execution")
                                                                                          String execution)

      protocol independent registration page entry point
      Parameters:
        `code` -
      Returns:

    - #### processRegister

          @Path(value="registration")
           @POST
          public javax.ws.rs.core.Response processRegister(@QueryParam(value="code")
                                                                                              String code,
                                                                                              @QueryParam(value="execution")
                                                                                              String execution)

      Registration
      Parameters:
        `code` -
      Returns:

    - #### firstBrokerLoginGet

          @Path(value="first-broker-login")
           @GET
          public javax.ws.rs.core.Response firstBrokerLoginGet(@QueryParam(value="code")
                                                                                                       String code,
                                                                                                       @QueryParam(value="execution")
                                                                                                       String execution)

    - #### firstBrokerLoginPost

          @Path(value="first-broker-login")
           @POST
          public javax.ws.rs.core.Response firstBrokerLoginPost(@QueryParam(value="code")
                                                                                                         String code,
                                                                                                         @QueryParam(value="execution")
                                                                                                         String execution)

    - #### postBrokerLoginGet

          @Path(value="post-broker-login")
           @GET
          public javax.ws.rs.core.Response postBrokerLoginGet(@QueryParam(value="code")
                                                                                                     String code,
                                                                                                     @QueryParam(value="execution")
                                                                                                     String execution)

    - #### postBrokerLoginPost

          @Path(value="post-broker-login")
           @POST
          public javax.ws.rs.core.Response postBrokerLoginPost(@QueryParam(value="code")
                                                                                                       String code,
                                                                                                       @QueryParam(value="execution")
                                                                                                       String execution)

    - #### brokerLoginFlow

          protected javax.ws.rs.core.Response brokerLoginFlow(String code,
                                                              String execution,
                                                              boolean firstBrokerLogin)

    - #### processConsent

          @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)

      OAuth grant page. You should not invoked this directly!
      Parameters:
        `formData` -
      Returns:

    - #### emailVerification

          @Path(value="email-verification")
           @GET
          public javax.ws.rs.core.Response emailVerification(@QueryParam(value="code")
                                                                                                     String code,
                                                                                                     @QueryParam(value="key")
                                                                                                     String key)

    - #### executeActions

          @Path(value="execute-actions")
           @GET
          public javax.ws.rs.core.Response executeActions(@QueryParam(value="key")
                                                                                               String key)

      Initiated by admin, not the user on login
      Parameters:
        `key` -
      Returns:

    - #### getActionCookie

          public static String getActionCookie(javax.ws.rs.core.HttpHeaders headers,
                                               RealmModel realm,
                                               javax.ws.rs.core.UriInfo uriInfo,
                                               ClientConnection clientConnection)

    - #### createActionCookie

          public static void createActionCookie(RealmModel realm,
                                                javax.ws.rs.core.UriInfo uriInfo,
                                                ClientConnection clientConnection,
                                                String sessionId)

    - #### requiredActionPOST

          @Path(value="required-action")
           @POST
          public javax.ws.rs.core.Response requiredActionPOST(@QueryParam(value="code")
                                                                                                    String code,
                                                                                                    @QueryParam(value="action")
                                                                                                    String action)

    - #### requiredActionGET

          @Path(value="required-action")
           @GET
          public javax.ws.rs.core.Response requiredActionGET(@QueryParam(value="code")
                                                                                                  String code,
                                                                                                  @QueryParam(value="action")
                                                                                                  String action)

    - #### processRequireAction

          public javax.ws.rs.core.Response processRequireAction(String code,
                                                                String action)

    - #### redirectToRequiredActions

          public javax.ws.rs.core.Response redirectToRequiredActions(String code)

Copyright © 2016 JBoss by Red Hat. All rights reserved.