Class CryptoAuthenticator
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.fulcrum.security.authenticator.CryptoAuthenticator
-
- All Implemented Interfaces:
org.apache.avalon.framework.activity.Disposable
,org.apache.avalon.framework.configuration.Configurable
,org.apache.avalon.framework.logger.LogEnabled
,org.apache.avalon.framework.service.Serviceable
,Authenticator
public class CryptoAuthenticator extends org.apache.avalon.framework.logger.AbstractLogEnabled implements Authenticator, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.configuration.Configurable
This class authenticates using the Fulcrum Crypto service a user and their password avalon.component name="crypto-authenticator" avalon.service type="org.apache.fulcrum.security.authenticator.Authenticator"- Version:
- $Id$
- Author:
- Eric Pugh
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.fulcrum.crypto.CryptoService
cryptoService
-
Fields inherited from interface org.apache.fulcrum.security.authenticator.Authenticator
ROLE
-
-
Constructor Summary
Constructors Constructor Description CryptoAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
authenticate(User user, String password)
Authenticate a user with the specified password.void
configure(org.apache.avalon.framework.configuration.Configuration conf)
void
dispose()
void
service(org.apache.avalon.framework.service.ServiceManager manager)
-
-
-
Field Detail
-
cryptoService
protected org.apache.fulcrum.crypto.CryptoService cryptoService
-
-
Constructor Detail
-
CryptoAuthenticator
public CryptoAuthenticator()
-
-
Method Detail
-
authenticate
public boolean authenticate(User user, String password) throws DataBackendException
Authenticate a user with the specified password. If authentication is successful the method returns true. If it fails, it returns false If there are any problems, an exception is thrown.- Specified by:
authenticate
in interfaceAuthenticator
- Parameters:
user
- a User object.password
- the user supplied password.- Throws:
DataBackendException
- if there is a problem accessing the storage.
-
configure
public void configure(org.apache.avalon.framework.configuration.Configuration conf) throws org.apache.avalon.framework.configuration.ConfigurationException
- Specified by:
configure
in interfaceorg.apache.avalon.framework.configuration.Configurable
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
-
service
public void service(org.apache.avalon.framework.service.ServiceManager manager) throws org.apache.avalon.framework.service.ServiceException
- Specified by:
service
in interfaceorg.apache.avalon.framework.service.Serviceable
- Throws:
org.apache.avalon.framework.service.ServiceException
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceorg.apache.avalon.framework.activity.Disposable
-
-