Interface BlockingCredentialProvider

All Superinterfaces:
CredentialProvider
All Known Implementing Classes:
AADCredentialProvider, AbstractOIDCCredentialProvider, AutoDiscoveringOIDCCredentialProvider, BasicCredentialProvider, CASCredentialProvider, FacebookCredentialProvider, FormCredentialProvider, GenericOIDCCredentialProvider, GoogleCredentialProvider, UserDAO.ImpersonateCredentialProvider

Defines a CredentialProvider that can be blocking.
  • Method Details

    • blockingGrantAnonymousRequest

      Method called by AuthenticateAction before asking for credentials. This method is used to bypass authentication. If this method returns true, no authentication will be required. Use it with care, as it may lead to obvious security issues.
      Returns:
      true if the Request is not authenticated
    • blockingIsStillConnected

      boolean blockingIsStillConnected(UserIdentity userIdentity, Redirector redirector) throws Exception
      Validates that the user specify is still connected
      Parameters:
      userIdentity - the user previously correctly identified with this credential provider
      redirector - The cocoon redirector
      Returns:
      true if this CredentialProvider was in a valid state, false to restart authentication process
      Throws:
      Exception - If an error occurred
    • blockingGetUserIdentity

      Method called by AuthenticateAction each time a request need authentication.
      Parameters:
      redirector - the cocoon redirector.
      Returns:
      the UserIdentity corresponding to the user (with or without population specified), or null if user could not get authenticated.
      Throws:
      Exception - if something wrong occurs
    • blockingUserNotAllowed

      void blockingUserNotAllowed(Redirector redirector) throws Exception
      Method called by AuthenticateAction each a user could not get authenticated. This method implementation is responsible of redirecting response to appropriate url.
      Parameters:
      redirector - the cocoon Redirector that can be used for redirecting response.
      Throws:
      Exception - if something wrong occurs
    • blockingUserAllowed

      void blockingUserAllowed(UserIdentity userIdentity, Redirector redirector) throws Exception
      Method called by AuthenticateAction after authentication process succeeded
      Parameters:
      userIdentity - The user correctly connected
      redirector - the cocoon Redirector that can be used for redirecting response.
      Throws:
      Exception - if something wrong occurs
    • requiresNewWindow

      Does this blocking credential provider requires a new window to process.
      Returns:
      true to ask the client to process this credential provider throught a new window