Interface AutoLoginManager


public interface AutoLoginManager
  • Field Details

  • Method Details

    • prepareAutoLoginNonce

      Prepares an auto-login flow. It is typically called by a registration or activation handler.
      Parameters:
      attrs - the account attributes to use on login.
      Returns:
      If successful, a pair with the nonce session key and the user name.
    • enableAutoLoginNonce

      void enableAutoLoginNonce(String sessionKey)
      Enables an auto-login flow. Typically called after an user confirmation. Before this method is called, the auto-login method is not usable.
      Parameters:
      sessionKey - the session key where the auto-login nonce is to be found.
    • getAutoLoginFromCurrentSession

      Optional<AuthenticationResult> getAutoLoginFromCurrentSession()
      Checks if the current session has an enabled and valid auto-login nonce. If so, returns the authentication information associated to it.
      Returns:
      An optional authentication result, which can be used as the return of an authentication handler.
    • addToResponse

      static void addToResponse(Response response, AutoLoginManager.ConfirmData data)
      Adds the confirmation view data to response view model
      Parameters:
      response - the HTTP respose where the view information is assigned.
      data - the confirmation data.
    • addActionToRepresentation

      static void addActionToRepresentation(Actions actions, RepresentationModel model)
      Adds a form action for auto-login to an HAAPI representation being built, if auto-login is enabled.

      Uses the model data added by addToResponse(Response, ConfirmData). The form action that is added to the representations POSTs to the PATH_CONFIRM_CONTINUE path relative to the authenticator's anonymous endpoint.

      Parameters:
      actions - The builder allowing the addition of actions to the representation
      model - The response model