Class DefaultAuthenticationManager
- java.lang.Object
-
- org.apache.archiva.redback.authentication.DefaultAuthenticationManager
-
- All Implemented Interfaces:
AuthenticationManager
@Service("authenticationManager") public class DefaultAuthenticationManager extends Object implements AuthenticationManager
DefaultAuthenticationManager: 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 AuthenticationResult
authenticate(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.String
getId()
Returns the identifier of this authentication managervoid
initialize()
void
modifyControl(AuthenticatorControl control)
Modifies the control for a single authenticatorvoid
setControls(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:AuthenticationManager
Returns the identifier of this authentication manager- Specified by:
getId
in interfaceAuthenticationManager
- Returns:
- the identifier string
-
authenticate
public AuthenticationResult authenticate(AuthenticationDataSource source) throws AccountLockedException, AuthenticationException, MustChangePasswordException
Description copied from interface:AuthenticationManager
Authenticates by calling all authenticators in the defined order.- Specified by:
authenticate
in 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:AuthenticationManager
Returns the authenticator controls that are used to control the order and actions during authentication.- Specified by:
getControls
in interfaceAuthenticationManager
- Returns:
- the list of controls
-
setControls
public void setControls(List<AuthenticatorControl> controlList)
Description copied from interface:AuthenticationManager
Sets the list of authenticator controls- Specified by:
setControls
in interfaceAuthenticationManager
- Parameters:
controlList
- the list of control instances
-
modifyControl
public void modifyControl(AuthenticatorControl control)
Description copied from interface:AuthenticationManager
Modifies the control for a single authenticator- Specified by:
modifyControl
in interfaceAuthenticationManager
- Parameters:
control
- the authenticator control
-
getAuthenticators
public List<Authenticator> getAuthenticators()
Description copied from interface:AuthenticationManager
Returns the list of authenticators in the same order as they are called for authentication- Specified by:
getAuthenticators
in interfaceAuthenticationManager
- Returns:
- the list of authenticators.
-
-