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:
parent
8e5d19325d
commit
d37b46e5c7
|
@ -36,4 +36,6 @@ public interface Authenticator
|
||||||
|
|
||||||
AuthenticationResult authenticate( AuthenticationDataSource source )
|
AuthenticationResult authenticate( AuthenticationDataSource source )
|
||||||
throws AccountLockedException, AuthenticationException, MustChangePasswordException;
|
throws AccountLockedException, AuthenticationException, MustChangePasswordException;
|
||||||
|
|
||||||
|
void initialize() throws AuthenticationException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.apache.archiva.redback.authentication.ldap;
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.apache.archiva.redback.authentication.AbstractAuthenticator;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationConstants;
|
import org.apache.archiva.redback.authentication.AuthenticationConstants;
|
||||||
import org.apache.archiva.redback.common.ldap.UserMapper;
|
import org.apache.archiva.redback.common.ldap.UserMapper;
|
||||||
import org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory;
|
import org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory;
|
||||||
|
@ -54,6 +55,7 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
@Service( "authenticator#ldap" )
|
@Service( "authenticator#ldap" )
|
||||||
public class LdapBindAuthenticator
|
public class LdapBindAuthenticator
|
||||||
|
extends AbstractAuthenticator
|
||||||
implements Authenticator
|
implements Authenticator
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.apache.archiva.redback.authentication.memory;
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.apache.archiva.redback.authentication.AbstractAuthenticator;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
|
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationException;
|
import org.apache.archiva.redback.authentication.AuthenticationException;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationResult;
|
import org.apache.archiva.redback.authentication.AuthenticationResult;
|
||||||
|
@ -33,6 +34,7 @@ import org.springframework.stereotype.Service;
|
||||||
*/
|
*/
|
||||||
@Service("authenticator#memory")
|
@Service("authenticator#memory")
|
||||||
public class MemoryAuthenticator
|
public class MemoryAuthenticator
|
||||||
|
extends AbstractAuthenticator
|
||||||
implements Authenticator
|
implements Authenticator
|
||||||
{
|
{
|
||||||
private String login;
|
private String login;
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.apache.archiva.redback.authentication.open;
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.apache.archiva.redback.authentication.AbstractAuthenticator;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
|
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationException;
|
import org.apache.archiva.redback.authentication.AuthenticationException;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationResult;
|
import org.apache.archiva.redback.authentication.AuthenticationResult;
|
||||||
|
@ -32,11 +33,10 @@ import org.springframework.stereotype.Service;
|
||||||
* All attempts result in access.
|
* All attempts result in access.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Service("authenticator#open")
|
@Service("authenticator#open")
|
||||||
public class OpenAuthenticator
|
public class OpenAuthenticator
|
||||||
|
extends AbstractAuthenticator
|
||||||
implements Authenticator
|
implements Authenticator
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.apache.archiva.redback.authentication.users;
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.apache.archiva.redback.authentication.AbstractAuthenticator;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationConstants;
|
import org.apache.archiva.redback.authentication.AuthenticationConstants;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
|
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationException;
|
import org.apache.archiva.redback.authentication.AuthenticationException;
|
||||||
|
@ -50,6 +51,7 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
@Service("authenticator#user-manager")
|
@Service("authenticator#user-manager")
|
||||||
public class UserManagerAuthenticator
|
public class UserManagerAuthenticator
|
||||||
|
extends AbstractAuthenticator
|
||||||
implements Authenticator
|
implements Authenticator
|
||||||
{
|
{
|
||||||
private Logger log = LoggerFactory.getLogger( getClass() );
|
private Logger log = LoggerFactory.getLogger( getClass() );
|
||||||
|
@ -66,6 +68,7 @@ public class UserManagerAuthenticator
|
||||||
return "UserManagerAuthenticator";
|
return "UserManagerAuthenticator";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws org.apache.archiva.redback.policy.AccountLockedException
|
* @throws org.apache.archiva.redback.policy.AccountLockedException
|
||||||
*
|
*
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.apache.archiva.redback.authentication.keystore;
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.apache.archiva.redback.authentication.AbstractAuthenticator;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
|
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationException;
|
import org.apache.archiva.redback.authentication.AuthenticationException;
|
||||||
import org.apache.archiva.redback.authentication.AuthenticationResult;
|
import org.apache.archiva.redback.authentication.AuthenticationResult;
|
||||||
|
@ -47,6 +48,7 @@ import javax.annotation.Resource;
|
||||||
*/
|
*/
|
||||||
@Service("authenticator#keystore")
|
@Service("authenticator#keystore")
|
||||||
public class KeyStoreAuthenticator
|
public class KeyStoreAuthenticator
|
||||||
|
extends AbstractAuthenticator
|
||||||
implements Authenticator
|
implements Authenticator
|
||||||
{
|
{
|
||||||
private Logger log = LoggerFactory.getLogger( getClass() );
|
private Logger log = LoggerFactory.getLogger( getClass() );
|
||||||
|
|
Loading…
Reference in New Issue