Class RecoveryModeAwareTokenAuthenticationManager

java.lang.Object
com.atlassian.crowd.manager.authentication.TokenAuthenticationManagerImpl
com.atlassian.crowd.manager.token.RecoveryModeAwareTokenAuthenticationManager
All Implemented Interfaces:
TokenAuthenticationManager

public class RecoveryModeAwareTokenAuthenticationManager extends TokenAuthenticationManagerImpl
  • Constructor Details

  • Method Details

    • isAllowedToAuthenticate

      protected boolean isAllowedToAuthenticate(String username, long directoryId, Application application) throws OperationFailedException, DirectoryNotFoundException
      Description copied from class: TokenAuthenticationManagerImpl
      Determines if a user is permitted to attempt authentication with a given application.

      For a a user to have access to an application:

      1. the Application must be active.

      And either:

      • the User is stored in a directory which is associated to the Application and the "allow all to authenticate" flag is true.
      • the User is a member of a Group that is allowed to authenticate with the Application and both the User and Group are from the same RemoteDirectory.

      Note that this call is not cached and does not affect the cache.

      Overrides:
      isAllowedToAuthenticate in class TokenAuthenticationManagerImpl
      Parameters:
      username - the username of the user that wants to authenticate with the application.
      directoryId - the directoryId of the user that wants to authenticate with the application.
      application - application the user wants to authenticate with.
      Returns:
      true iff the user is permitted to attempt authentication with the application.
      Throws:
      OperationFailedException - if the directory implementation could not be loaded when performing a membership check.
      DirectoryNotFoundException