Class DefaultAuthenticationManager
- java.lang.Object
-
- org.apache.archiva.redback.authentication.DefaultAuthenticationManager
-
- All Implemented Interfaces:
AuthenticationManager
@Service("authenticationManager") public class DefaultAuthenticationManager extends Object implements AuthenticationManagerDefaultAuthenticationManager: the goal of the authentication manager is to act as a conduit for authentication requests into different authentication schemesFor example, the default implementation can be configured with any number of authenticators and will sequentially try them for an authenticated result. This allows you to have the standard user/pass auth procedure followed by authentication based on a known key for 'remember me' type functionality.
-
-
Constructor Summary
Constructors Constructor Description DefaultAuthenticationManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticationResultauthenticate(AuthenticationDataSource source)Authenticates by calling all authenticators in the defined order.List<Authenticator>getAuthenticators()Returns the list of authenticators in the same order as they are called for authenticationList<AuthenticatorControl>getControls()Returns the authenticator controls that are used to control the order and actions during authentication.StringgetId()Returns the identifier of this authentication managervoidinitialize()voidmodifyControl(AuthenticatorControl control)Modifies the control for a single authenticatorvoidsetControls(List<AuthenticatorControl> controlList)Sets the list of authenticator controls
-
-
-
Constructor Detail
-
DefaultAuthenticationManager
public DefaultAuthenticationManager()
-
-
Method Detail
-
initialize
@PostConstruct public void initialize()
-
getId
public String getId()
Description copied from interface:AuthenticationManagerReturns the identifier of this authentication manager- Specified by:
getIdin interfaceAuthenticationManager- Returns:
- the identifier string
-
authenticate
public AuthenticationResult authenticate(AuthenticationDataSource source) throws AccountLockedException, AuthenticationException, MustChangePasswordException
Description copied from interface:AuthenticationManagerAuthenticates by calling all authenticators in the defined order.- Specified by:
authenticatein interfaceAuthenticationManager- Parameters:
source- the authentication data- Returns:
- the result that gives information, if the authentication was successful
- Throws:
AccountLockedException- if the account is lockedAuthenticationException- if something unexpected happend during authenticationMustChangePasswordException- if the user has to change his password
-
getControls
public List<AuthenticatorControl> getControls()
Description copied from interface:AuthenticationManagerReturns the authenticator controls that are used to control the order and actions during authentication.- Specified by:
getControlsin interfaceAuthenticationManager- Returns:
- the list of controls
-
setControls
public void setControls(List<AuthenticatorControl> controlList)
Description copied from interface:AuthenticationManagerSets the list of authenticator controls- Specified by:
setControlsin interfaceAuthenticationManager- Parameters:
controlList- the list of control instances
-
modifyControl
public void modifyControl(AuthenticatorControl control)
Description copied from interface:AuthenticationManagerModifies the control for a single authenticator- Specified by:
modifyControlin interfaceAuthenticationManager- Parameters:
control- the authenticator control
-
getAuthenticators
public List<Authenticator> getAuthenticators()
Description copied from interface:AuthenticationManagerReturns the list of authenticators in the same order as they are called for authentication- Specified by:
getAuthenticatorsin interfaceAuthenticationManager- Returns:
- the list of authenticators.
-
-