Interface AuthenticationManager

  • All Known Implementing Classes:
    AuthenticationManagerImpl

    public interface AuthenticationManager
    Manages authentication.
    Author:
    avasquez
    • Method Detail

      • authenticateUser

        Authentication authenticateUser​(String tenant,
                                        String username,
                                        String password)
                                 throws AuthenticationException
        Authenticates a user.
        Parameters:
        tenant - the tenant's name the user profile belongs to
        username - the user's username
        password - the user's password
        Returns:
        the authentication object, which contains the ticket and the user's profile
        Throws:
        AuthenticationException
      • authenticateUser

        Authentication authenticateUser​(String[] tenants,
                                        String username,
                                        String password)
                                 throws AuthenticationException
        Authenticates a user.
        Parameters:
        tenants - the tenant chain to try authentication with
        username - the user's username
        password - the user's password
        Returns:
        the authentication object, which contains the ticket and the user's profile
        Throws:
        AuthenticationException
      • authenticateUser

        Authentication authenticateUser​(Profile profile)
                                 throws AuthenticationException
        Authenticates a user just with it's profile ID. Use only when the user has already being identified.
        Parameters:
        profile - the user's profile
        Returns:
        the authentication object, which contains the ticket and the user's profile
        Throws:
        AuthenticationException
      • authenticateUser

        Authentication authenticateUser​(Profile profile,
                                        boolean remembered)
                                 throws AuthenticationException
        Authenticates a user just with it's profile ID. Use only when the user has already being identified.
        Parameters:
        profile - the user's profile
        remembered - if the authentication was done through remember me.
        Returns:
        the authentication object, which contains the ticket and the user's profile
        Throws:
        AuthenticationException
      • getAuthentication

        Authentication getAuthentication​(String ticket,
                                         boolean reloadProfile)
                                  throws AuthenticationException
        Returns the authentication associated to the given ticket ID
        Parameters:
        ticket - the authentication ticket
        reloadProfile - if the cached profile should be reloaded
        Returns:
        the authentication object associated to the ticket ID, or null if no authentication was found for the ticket ID (anonymous user)
        Throws:
        AuthenticationException