public class AuthenticationManagerImpl extends Object implements AuthenticationManager
AuthenticationManager
.Modifier and Type | Field and Description |
---|---|
protected AuthenticationCache |
authenticationCache |
protected AuthenticationService |
authenticationService |
protected ProfileService |
profileService |
Constructor and Description |
---|
AuthenticationManagerImpl() |
Modifier and Type | Method and Description |
---|---|
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 |
authenticateUser(String[] tenants,
String username,
String password)
Authenticates a user.
|
Authentication |
authenticateUser(String tenant,
String username,
String password)
Authenticates a user.
|
Authentication |
getAuthentication(String ticket,
boolean reloadProfile)
Returns the authentication associated to the given ticket ID
|
void |
invalidateAuthentication(Authentication authentication)
Invalidates the given authentication.
|
protected Profile |
loadProfile(String ticketId) |
void |
setAuthenticationCache(AuthenticationCache authenticationCache) |
void |
setAuthenticationService(AuthenticationService authenticationService) |
void |
setProfileService(ProfileService profileService) |
protected AuthenticationService authenticationService
protected ProfileService profileService
protected AuthenticationCache authenticationCache
public void setAuthenticationService(AuthenticationService authenticationService)
public void setProfileService(ProfileService profileService)
public void setAuthenticationCache(AuthenticationCache authenticationCache)
public Authentication authenticateUser(String tenant, String username, String password)
AuthenticationManager
authenticateUser
in interface AuthenticationManager
tenant
- the tenant's name the user profile belongs tousername
- the user's usernamepassword
- the user's passwordpublic Authentication authenticateUser(String[] tenants, String username, String password) throws AuthenticationException
AuthenticationManager
authenticateUser
in interface AuthenticationManager
tenants
- the tenant chain to try authentication withusername
- the user's usernamepassword
- the user's passwordAuthenticationException
public Authentication authenticateUser(Profile profile) throws AuthenticationException
AuthenticationManager
authenticateUser
in interface AuthenticationManager
profile
- the user's profileAuthenticationException
public Authentication authenticateUser(Profile profile, boolean remembered) throws AuthenticationException
AuthenticationManager
authenticateUser
in interface AuthenticationManager
profile
- the user's profileremembered
- if the authentication was done through remember me.AuthenticationException
public Authentication getAuthentication(String ticket, boolean reloadProfile) throws AuthenticationException
AuthenticationManager
getAuthentication
in interface AuthenticationManager
ticket
- the authentication ticketreloadProfile
- if the cached profile should be reloadedAuthenticationException
public void invalidateAuthentication(Authentication authentication)
AuthenticationManager
invalidateAuthentication
in interface AuthenticationManager
authentication
- the authentication to invalidateprotected Profile loadProfile(String ticketId) throws AuthenticationException
AuthenticationException
Copyright © 2023 CrafterCMS. All rights reserved.