Interface AuthenticationManager
-
- All Known Implementing Classes:
AuthenticationManagerImpl
public interface AuthenticationManager
Manages authentication.- Author:
- avasquez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Authentication
authenticateUser(String[] tenants, String username, String password)
Authenticates a user.Authentication
authenticateUser(String tenant, String username, String password)
Authenticates a user.Authentication
authenticateUser(Profile profile)
Authenticates a user just with it's profile ID.Authentication
authenticateUser(Profile profile, boolean remembered)
Authenticates a user just with it's profile ID.Authentication
getAuthentication(String ticket, boolean reloadProfile)
Returns the authentication associated to the given ticket IDvoid
invalidateAuthentication(Authentication authentication)
Invalidates the given authentication.
-
-
-
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 tousername
- the user's usernamepassword
- 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 withusername
- the user's usernamepassword
- 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 profileremembered
- 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 ticketreloadProfile
- 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
-
invalidateAuthentication
void invalidateAuthentication(Authentication authentication) throws AuthenticationException
Invalidates the given authentication.- Parameters:
authentication
- the authentication to invalidate- Throws:
AuthenticationException
-
-