expose intialize method for Authenticator to make it reloadable

git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1421469 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-12-13 20:04:16 +00:00
parent 8e5d19325d
commit d37b46e5c7
6 changed files with 14 additions and 3 deletions

View File

@ -36,4 +36,6 @@ public interface Authenticator
AuthenticationResult authenticate( AuthenticationDataSource source )
throws AccountLockedException, AuthenticationException, MustChangePasswordException;
void initialize() throws AuthenticationException;
}

View File

@ -19,6 +19,7 @@ package org.apache.archiva.redback.authentication.ldap;
* under the License.
*/
import org.apache.archiva.redback.authentication.AbstractAuthenticator;
import org.apache.archiva.redback.authentication.AuthenticationConstants;
import org.apache.archiva.redback.common.ldap.UserMapper;
import org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory;
@ -54,6 +55,7 @@ import java.util.Map;
*/
@Service( "authenticator#ldap" )
public class LdapBindAuthenticator
extends AbstractAuthenticator
implements Authenticator
{

View File

@ -19,6 +19,7 @@ package org.apache.archiva.redback.authentication.memory;
* under the License.
*/
import org.apache.archiva.redback.authentication.AbstractAuthenticator;
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
import org.apache.archiva.redback.authentication.AuthenticationException;
import org.apache.archiva.redback.authentication.AuthenticationResult;
@ -33,6 +34,7 @@ import org.springframework.stereotype.Service;
*/
@Service("authenticator#memory")
public class MemoryAuthenticator
extends AbstractAuthenticator
implements Authenticator
{
private String login;

View File

@ -19,6 +19,7 @@ package org.apache.archiva.redback.authentication.open;
* under the License.
*/
import org.apache.archiva.redback.authentication.AbstractAuthenticator;
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
import org.apache.archiva.redback.authentication.AuthenticationException;
import org.apache.archiva.redback.authentication.AuthenticationResult;
@ -32,11 +33,10 @@ import org.springframework.stereotype.Service;
* All attempts result in access.
*
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
*
*
*/
@Service("authenticator#open")
public class OpenAuthenticator
extends AbstractAuthenticator
implements Authenticator
{

View File

@ -19,6 +19,7 @@ package org.apache.archiva.redback.authentication.users;
* under the License.
*/
import org.apache.archiva.redback.authentication.AbstractAuthenticator;
import org.apache.archiva.redback.authentication.AuthenticationConstants;
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
import org.apache.archiva.redback.authentication.AuthenticationException;
@ -50,6 +51,7 @@ import java.util.Map;
*/
@Service("authenticator#user-manager")
public class UserManagerAuthenticator
extends AbstractAuthenticator
implements Authenticator
{
private Logger log = LoggerFactory.getLogger( getClass() );
@ -66,6 +68,7 @@ public class UserManagerAuthenticator
return "UserManagerAuthenticator";
}
/**
* @throws org.apache.archiva.redback.policy.AccountLockedException
*

View File

@ -19,6 +19,7 @@ package org.apache.archiva.redback.authentication.keystore;
* under the License.
*/
import org.apache.archiva.redback.authentication.AbstractAuthenticator;
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
import org.apache.archiva.redback.authentication.AuthenticationException;
import org.apache.archiva.redback.authentication.AuthenticationResult;
@ -47,6 +48,7 @@ import javax.annotation.Resource;
*/
@Service("authenticator#keystore")
public class KeyStoreAuthenticator
extends AbstractAuthenticator
implements Authenticator
{
private Logger log = LoggerFactory.getLogger( getClass() );