diff --git a/redback-authentication/redback-authentication-api/src/main/java/org/apache/archiva/redback/authentication/Authenticator.java b/redback-authentication/redback-authentication-api/src/main/java/org/apache/archiva/redback/authentication/Authenticator.java index 54805bcf..6efe11ca 100644 --- a/redback-authentication/redback-authentication-api/src/main/java/org/apache/archiva/redback/authentication/Authenticator.java +++ b/redback-authentication/redback-authentication-api/src/main/java/org/apache/archiva/redback/authentication/Authenticator.java @@ -36,4 +36,6 @@ public interface Authenticator AuthenticationResult authenticate( AuthenticationDataSource source ) throws AccountLockedException, AuthenticationException, MustChangePasswordException; + + void initialize() throws AuthenticationException; } diff --git a/redback-authentication/redback-authentication-providers/redback-authentication-ldap/src/main/java/org/apache/archiva/redback/authentication/ldap/LdapBindAuthenticator.java b/redback-authentication/redback-authentication-providers/redback-authentication-ldap/src/main/java/org/apache/archiva/redback/authentication/ldap/LdapBindAuthenticator.java index a4b51fee..7cf582fa 100644 --- a/redback-authentication/redback-authentication-providers/redback-authentication-ldap/src/main/java/org/apache/archiva/redback/authentication/ldap/LdapBindAuthenticator.java +++ b/redback-authentication/redback-authentication-providers/redback-authentication-ldap/src/main/java/org/apache/archiva/redback/authentication/ldap/LdapBindAuthenticator.java @@ -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 { diff --git a/redback-authentication/redback-authentication-providers/redback-authentication-memory/src/main/java/org/apache/archiva/redback/authentication/memory/MemoryAuthenticator.java b/redback-authentication/redback-authentication-providers/redback-authentication-memory/src/main/java/org/apache/archiva/redback/authentication/memory/MemoryAuthenticator.java index 4bc98e31..92de62b1 100644 --- a/redback-authentication/redback-authentication-providers/redback-authentication-memory/src/main/java/org/apache/archiva/redback/authentication/memory/MemoryAuthenticator.java +++ b/redback-authentication/redback-authentication-providers/redback-authentication-memory/src/main/java/org/apache/archiva/redback/authentication/memory/MemoryAuthenticator.java @@ -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; diff --git a/redback-authentication/redback-authentication-providers/redback-authentication-open/src/main/java/org/apache/archiva/redback/authentication/open/OpenAuthenticator.java b/redback-authentication/redback-authentication-providers/redback-authentication-open/src/main/java/org/apache/archiva/redback/authentication/open/OpenAuthenticator.java index b87c8f59..8d0f9577 100644 --- a/redback-authentication/redback-authentication-providers/redback-authentication-open/src/main/java/org/apache/archiva/redback/authentication/open/OpenAuthenticator.java +++ b/redback-authentication/redback-authentication-providers/redback-authentication-open/src/main/java/org/apache/archiva/redback/authentication/open/OpenAuthenticator.java @@ -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; @@ -29,14 +30,13 @@ import org.springframework.stereotype.Service; /** * OpenAuthenticator - Does not test user / password. - * All attempts result in access. + * All attempts result in access. * * @author Joakim Erdfelt - * - * */ @Service("authenticator#open") public class OpenAuthenticator + extends AbstractAuthenticator implements Authenticator { diff --git a/redback-authentication/redback-authentication-providers/redback-authentication-users/src/main/java/org/apache/archiva/redback/authentication/users/UserManagerAuthenticator.java b/redback-authentication/redback-authentication-providers/redback-authentication-users/src/main/java/org/apache/archiva/redback/authentication/users/UserManagerAuthenticator.java index eb982dda..d62f2e77 100644 --- a/redback-authentication/redback-authentication-providers/redback-authentication-users/src/main/java/org/apache/archiva/redback/authentication/users/UserManagerAuthenticator.java +++ b/redback-authentication/redback-authentication-providers/redback-authentication-users/src/main/java/org/apache/archiva/redback/authentication/users/UserManagerAuthenticator.java @@ -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 * diff --git a/redback-keys/redback-authentication-keys/src/main/java/org/apache/archiva/redback/authentication/keystore/KeyStoreAuthenticator.java b/redback-keys/redback-authentication-keys/src/main/java/org/apache/archiva/redback/authentication/keystore/KeyStoreAuthenticator.java index f3d549f3..035c1e4c 100644 --- a/redback-keys/redback-authentication-keys/src/main/java/org/apache/archiva/redback/authentication/keystore/KeyStoreAuthenticator.java +++ b/redback-keys/redback-authentication-keys/src/main/java/org/apache/archiva/redback/authentication/keystore/KeyStoreAuthenticator.java @@ -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() );