* under the License.
*/
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
/**
* @author Jason van Zyl
* under the License.
*/
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
import javax.naming.directory.Attributes;
import java.io.Serializable;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.configuration.UserConfiguration;
-import org.codehaus.plexus.redback.users.User;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
* under the License.
*/
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
import javax.naming.directory.Attributes;
* under the License.
*/
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.redback.keys.KeyManager;
import org.codehaus.plexus.redback.rbac.RBACManager;
import org.codehaus.plexus.redback.rbac.RbacManagerException;
-import org.codehaus.plexus.redback.users.UserManager;
import javax.xml.stream.XMLStreamException;
import java.io.File;
import javax.xml.stream.XMLStreamException;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.redback.keys.AuthenticationKey;
import org.codehaus.plexus.redback.keys.KeyManager;
import org.codehaus.plexus.redback.keys.KeyManagerException;
import org.codehaus.plexus.redback.rbac.jdo.RbacDatabase;
import org.codehaus.plexus.redback.rbac.jdo.io.stax.RbacJdoModelStaxReader;
import org.codehaus.plexus.redback.rbac.jdo.io.stax.RbacJdoModelStaxWriter;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.users.jdo.UserDatabase;
import org.codehaus.plexus.redback.users.jdo.io.stax.UsersManagementStaxReader;
import org.codehaus.plexus.redback.users.jdo.io.stax.UsersManagementStaxWriter;
*/
import junit.framework.TestCase;
+import org.apache.archiva.redback.users.UserManager;
import org.apache.commons.lang.SystemUtils;
import org.codehaus.plexus.redback.common.jdo.UserConfigurableJdoFactory;
import org.codehaus.plexus.redback.keys.AuthenticationKey;
import org.codehaus.plexus.redback.rbac.Role;
import org.codehaus.plexus.redback.rbac.UserAssignment;
import org.codehaus.plexus.redback.tests.utils.RBACDefaults;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
import org.custommonkey.xmlunit.XMLAssert;
* under the License.
*/
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.apache.commons.lang.StringUtils;
import org.codehaus.plexus.redback.authentication.PasswordBasedAuthenticationDataSource;
import org.codehaus.plexus.redback.configuration.UserConfiguration;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystem;
import org.codehaus.plexus.redback.system.check.EnvironmentCheck;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.util.IOUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
import org.codehaus.plexus.redback.role.RoleManager;
import org.codehaus.plexus.redback.role.RoleManagerException;
import org.codehaus.plexus.redback.system.SecuritySystem;
import org.codehaus.plexus.redback.system.check.EnvironmentCheck;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserManager;
import org.springframework.stereotype.Service;
import javax.inject.Inject;
* under the License.
*/
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.rbac.RBACManager;
import org.codehaus.plexus.redback.rbac.RbacManagerException;
import org.codehaus.plexus.redback.rbac.UserAssignment;
import org.codehaus.plexus.redback.system.check.EnvironmentCheck;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.redback.integration.role.RoleConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.authentication.AuthenticationDataSource;
import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.authentication.AuthenticationResult;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystem;
import org.codehaus.plexus.redback.system.SecuritySystemConstants;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
import org.codehaus.plexus.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.apache.commons.codec.binary.Base64;
import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.authentication.AuthenticationResult;
import org.codehaus.plexus.redback.authentication.TokenBasedAuthenticationDataSource;
import org.codehaus.plexus.redback.policy.AccountLockedException;
import org.codehaus.plexus.redback.policy.MustChangePasswordException;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.redback.integration.filter.authentication.HttpAuthenticationException;
import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator;
* under the License.
*/
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
/**
* AdminEditUserCredentials
* under the License.
*/
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
import org.codehaus.redback.integration.util.DateUtils;
/**
* under the License.
*/
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.util.StringUtils;
import java.io.Serializable;
* specific language governing permissions and limitations
* under the License.
*/
+import org.apache.archiva.redback.users.UserManager;
import org.apache.commons.lang.StringEscapeUtils;
import org.codehaus.plexus.redback.rbac.RBACManager;
import org.codehaus.plexus.redback.rbac.RbacManagerException;
import org.codehaus.plexus.redback.rbac.Role;
import org.codehaus.plexus.redback.rbac.UserAssignment;
import org.codehaus.plexus.redback.system.SecuritySystem;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
+import org.apache.archiva.redback.users.User;
import org.codehaus.redback.integration.util.RoleSorter;
import org.codehaus.redback.integration.util.UserComparator;
import org.springframework.stereotype.Service;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.lang.StringEscapeUtils;
import org.codehaus.plexus.redback.system.SecuritySystem;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
import org.codehaus.redback.integration.util.UserComparator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
* under the License.
*/
-import org.codehaus.plexus.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserManager;
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
* under the License.
*/
-import org.codehaus.plexus.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserManager;
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import java.util.Comparator;
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
/**
* UserComparator
import java.util.Iterator;
import java.util.Set;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.policy.AccountLockedException;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
import org.codehaus.plexus.redback.rbac.Permission;
import org.codehaus.plexus.redback.rbac.RBACManager;
import org.codehaus.plexus.redback.rbac.RbacManagerException;
import org.codehaus.plexus.redback.rbac.UserAssignment;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserManager;
import org.jsecurity.authc.AuthenticationException;
import org.jsecurity.authc.AuthenticationInfo;
import org.jsecurity.authc.AuthenticationToken;
*/
import junit.framework.TestCase;
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
import org.codehaus.plexus.redback.rbac.Operation;
import org.codehaus.plexus.redback.rbac.Permission;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.rbac.Role;
import org.codehaus.plexus.redback.rbac.UserAssignment;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserManager;
import org.jsecurity.authc.IncorrectCredentialsException;
import org.jsecurity.authc.UsernamePasswordToken;
import org.jsecurity.mgt.DefaultSecurityManager;
this.locked = locked;
}
- public User( org.codehaus.plexus.redback.users.User user )
+ public User( org.apache.archiva.redback.users.User user )
{
setUsername( user.getUsername() );
this.setEmail( user.getEmail() );
* specific language governing permissions and limitations
* under the License.
*/
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.authentication.PasswordBasedAuthenticationDataSource;
import org.codehaus.plexus.redback.keys.AuthenticationKey;
import org.codehaus.plexus.redback.policy.MustChangePasswordException;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystem;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator;
import org.codehaus.redback.rest.api.model.User;
import org.codehaus.redback.rest.api.services.LoginService;
SecuritySession securitySession = securitySystem.authenticate( authDataSource );
if ( securitySession.getAuthenticationResult().isAuthenticated() )
{
- org.codehaus.plexus.redback.users.User user = securitySession.getUser();
+ org.apache.archiva.redback.users.User user = securitySession.getUser();
if ( !user.isValidated() )
{
log.info( "user {} not validated", user.getUsername() );
return Calendar.getInstance( TimeZone.getTimeZone( "GMT" ) );
}
- private User buildRestUser( org.codehaus.plexus.redback.users.User user )
+ private User buildRestUser( org.apache.archiva.redback.users.User user )
{
User restUser = new User();
restUser.setEmail( user.getEmail() );
* under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.apache.commons.lang.StringUtils;
import org.codehaus.plexus.redback.keys.AuthenticationKey;
import org.codehaus.plexus.redback.keys.KeyManagerException;
import org.codehaus.plexus.redback.policy.PasswordRuleViolationException;
import org.codehaus.plexus.redback.policy.PasswordRuleViolations;
import org.codehaus.plexus.redback.system.SecuritySystem;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator;
import org.codehaus.redback.rest.api.model.ErrorMessage;
import org.codehaus.redback.rest.api.services.PasswordService;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.apache.commons.lang.StringUtils;
import org.codehaus.plexus.redback.rbac.Permission;
import org.codehaus.plexus.redback.rbac.RBACManager;
import org.codehaus.plexus.redback.role.model.ModelApplication;
import org.codehaus.plexus.redback.role.model.ModelRole;
import org.codehaus.plexus.redback.role.model.ModelTemplate;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
import org.codehaus.redback.integration.model.AdminEditUserCredentials;
import org.codehaus.redback.integration.security.role.RedbackRoleConstants;
import org.codehaus.redback.integration.util.RoleSorter;
*/
import net.sf.ehcache.CacheManager;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.apache.commons.lang.StringUtils;
import org.codehaus.plexus.cache.Cache;
import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.role.RoleManager;
import org.codehaus.plexus.redback.role.RoleManagerException;
import org.codehaus.plexus.redback.system.SecuritySystem;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator;
import org.codehaus.redback.integration.mail.Mailer;
import org.codehaus.redback.integration.security.role.RedbackRoleConstants;
try
{
- org.codehaus.plexus.redback.users.User u = userManager.findUser( user.getUsername() );
+ org.apache.archiva.redback.users.User u = userManager.findUser( user.getUsername() );
if ( u != null )
{
throw new RedbackServiceException(
throw new RedbackServiceException( new ErrorMessage( "email cannot be empty" ) );
}
- org.codehaus.plexus.redback.users.User u =
+ org.apache.archiva.redback.users.User u =
userManager.createUser( user.getUsername(), user.getFullName(), user.getEmail() );
u.setPassword( user.getPassword() );
u.setLocked( user.isLocked() );
{
try
{
- org.codehaus.plexus.redback.users.User user = userManager.findUser( username );
+ org.apache.archiva.redback.users.User user = userManager.findUser( username );
return getSimpleUser( user );
}
catch ( UserNotFoundException e )
public List<User> getUsers()
throws RedbackServiceException
{
- List<org.codehaus.plexus.redback.users.User> users = userManager.getUsers();
+ List<org.apache.archiva.redback.users.User> users = userManager.getUsers();
List<User> simpleUsers = new ArrayList<User>( users.size() );
- for ( org.codehaus.plexus.redback.users.User user : users )
+ for ( org.apache.archiva.redback.users.User user : users )
{
simpleUsers.add( getSimpleUser( user ) );
}
{
try
{
- org.codehaus.plexus.redback.users.User rawUser = userManager.findUser( user.getUsername() );
+ org.apache.archiva.redback.users.User rawUser = userManager.findUser( user.getUsername() );
rawUser.setFullName( user.getFullName() );
rawUser.setEmail( user.getEmail() );
rawUser.setValidated( user.isValidated() );
{
try
{
- org.codehaus.plexus.redback.users.User user = userManager.getGuestUser();
+ org.apache.archiva.redback.users.User user = userManager.getGuestUser();
return getSimpleUser( user );
}
catch ( Exception e )
try
{
securitySystem.getPolicy().setEnabled( false );
- org.codehaus.plexus.redback.users.User user = userManager.createGuestUser();
+ org.apache.archiva.redback.users.User user = userManager.createGuestUser();
user.setPasswordChangeRequired( false );
user = userManager.updateUser( user, false );
roleManager.assignRole( "guest", user.getPrincipal().toString() );
return Boolean.TRUE;
}
- private User getSimpleUser( org.codehaus.plexus.redback.users.User user )
+ private User getSimpleUser( org.apache.archiva.redback.users.User user )
{
if ( user == null )
{
return Boolean.FALSE;
}
- org.codehaus.plexus.redback.users.User user =
+ org.apache.archiva.redback.users.User user =
userManager.createUser( RedbackRoleConstants.ADMINISTRATOR_ACCOUNT_NAME, adminUser.getFullName(),
adminUser.getEmail() );
user.setPassword( adminUser.getPassword() );
try
{
- org.codehaus.plexus.redback.users.User user = userManager.findUser( username );
+ org.apache.archiva.redback.users.User user = userManager.findUser( username );
AuthenticationKey authkey = keyManager.createKey( username, "Password Reset Request",
policy.getUserValidationSettings().getEmailValidationTimeout() );
new ErrorMessage( "user.already.exists", new String[]{ user.getUsername() } ) );
}
- org.codehaus.plexus.redback.users.User u =
+ org.apache.archiva.redback.users.User u =
userManager.createUser( user.getUsername(), user.getFullName(), user.getEmail() );
u.setPassword( user.getPassword() );
u.setValidated( false );
{
AuthenticationKey authkey = securitySystem.getKeyManager().findKey( key );
- org.codehaus.plexus.redback.users.User user =
+ org.apache.archiva.redback.users.User user =
securitySystem.getUserManager().findUser( authkey.getForPrincipal() );
user.setValidated( true );
{
validateCredentialsLoose( user );
- org.codehaus.plexus.redback.users.User tmpuser =
+ org.apache.archiva.redback.users.User tmpuser =
userManager.createUser( user.getUsername(), user.getFullName(), user.getEmail() );
user.setPassword( user.getPassword() );
* under the License.
*/
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
/**
* @author Olivier Lamy
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
import org.apache.cxf.jaxrs.ext.RequestHandler;
import org.apache.cxf.jaxrs.model.ClassResourceInfo;
import org.apache.cxf.message.Message;
import org.codehaus.plexus.redback.policy.AccountLockedException;
import org.codehaus.plexus.redback.policy.MustChangePasswordException;
import org.codehaus.plexus.redback.system.SecuritySession;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.redback.integration.filter.authentication.HttpAuthenticationException;
import org.codehaus.redback.integration.filter.authentication.basic.HttpBasicAuthentication;
import org.codehaus.redback.rest.services.RedbackAuthenticationThreadLocal;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.policy.PasswordEncoder;
import org.codehaus.plexus.redback.policy.PasswordRuleViolationException;
import org.codehaus.plexus.redback.policy.PasswordRuleViolations;
import org.codehaus.plexus.redback.system.SecuritySystem;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
import org.codehaus.redback.rest.api.model.ErrorMessage;
import org.codehaus.redback.rest.api.services.RedbackServiceException;
import org.slf4j.Logger;
* under the License.
*/
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.redback.configuration.UserConfiguration;
import org.codehaus.plexus.redback.rbac.RBACManager;
import org.codehaus.plexus.redback.role.RoleManager;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
-import org.codehaus.redback.integration.security.role.RedbackRoleConstants;
import org.codehaus.redback.rest.api.services.UserService;
import javax.inject.Inject;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.policy.PasswordRuleViolationException;
import org.codehaus.plexus.redback.rbac.Permission;
import org.codehaus.plexus.redback.rbac.RBACManager;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.rbac.Role;
import org.codehaus.plexus.redback.system.SecuritySystem;
-import org.codehaus.plexus.redback.users.User;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.redback.integration.model.UserCredentials;
-import org.codehaus.redback.integration.role.RoleConstants;
import org.codehaus.redback.integration.security.role.RedbackRoleConstants;
import org.codehaus.redback.integration.util.RoleSorter;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.policy.PasswordEncoder;
import org.codehaus.plexus.redback.policy.PasswordRuleViolationException;
import org.codehaus.plexus.redback.system.DefaultSecuritySession;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystemConstants;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.apache.struts2.ServletActionContext;
import org.codehaus.plexus.redback.authentication.AuthenticationConstants;
import org.codehaus.plexus.redback.authentication.AuthenticationDataSource;
import org.codehaus.plexus.redback.policy.MustChangePasswordException;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystem;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.policy.PasswordEncoder;
import org.codehaus.plexus.redback.policy.PasswordRuleViolationException;
import org.codehaus.plexus.redback.policy.PasswordRuleViolations;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystem;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
* under the License.
*/
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.keys.AuthenticationKey;
import org.codehaus.plexus.redback.keys.KeyManager;
import org.codehaus.plexus.redback.keys.KeyManagerException;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
import org.codehaus.plexus.redback.system.SecuritySystem;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.keys.AuthenticationKey;
import org.codehaus.plexus.redback.keys.KeyManagerException;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
import org.codehaus.plexus.redback.role.RoleManager;
import org.codehaus.plexus.redback.role.RoleManagerException;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
import org.codehaus.redback.integration.mail.Mailer;
* under the License.
*/
+import org.apache.archiva.redback.users.UserManager;
import org.apache.struts2.ServletActionContext;
import org.codehaus.plexus.redback.authentication.AuthenticationConstants;
import org.codehaus.plexus.redback.authentication.AuthenticationDataSource;
import org.codehaus.plexus.redback.role.RoleManagerException;
import org.codehaus.plexus.redback.struts2.action.AuditEvent;
import org.codehaus.plexus.redback.system.SecuritySession;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
import org.codehaus.redback.integration.model.EditUserCredentials;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.rbac.RbacManagerException;
import org.codehaus.plexus.redback.rbac.RbacObjectNotFoundException;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.struts2.action.AuditEvent;
import org.codehaus.plexus.redback.struts2.model.ApplicationRoleDetails;
import org.codehaus.plexus.redback.struts2.model.ApplicationRoleDetails.RoleTableCell;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import org.codehaus.plexus.redback.rbac.RBACManager;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.struts2.action.AbstractSecurityAction;
-import org.codehaus.plexus.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.redback.integration.interceptor.SecureAction;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.apache.commons.lang.StringEscapeUtils;
import org.codehaus.plexus.redback.rbac.Permission;
import org.codehaus.plexus.redback.rbac.RbacManagerException;
import org.codehaus.plexus.redback.rbac.UserAssignment;
import org.codehaus.plexus.redback.struts2.action.AbstractUserCredentialsAction;
import org.codehaus.plexus.redback.struts2.action.AuditEvent;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
-import org.codehaus.redback.integration.role.RoleConstants;
import org.codehaus.redback.integration.security.role.RedbackRoleConstants;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.struts2.action.AbstractUserCredentialsAction;
import org.codehaus.plexus.redback.struts2.action.AuditEvent;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
import org.codehaus.redback.integration.model.CreateUserCredentials;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.redback.rbac.RBACManager;
import org.codehaus.plexus.redback.rbac.RbacManagerException;
import org.codehaus.plexus.redback.rbac.RbacObjectInvalidException;
import org.codehaus.plexus.redback.struts2.action.AbstractSecurityAction;
import org.codehaus.plexus.redback.struts2.action.AuditEvent;
import org.codehaus.plexus.redback.struts2.action.CancellableAction;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.apache.commons.lang.StringEscapeUtils;
import org.codehaus.plexus.redback.policy.PasswordEncoder;
import org.codehaus.plexus.redback.policy.PasswordRuleViolationException;
import org.codehaus.plexus.redback.system.DefaultSecuritySession;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystemConstants;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.struts2.ServletActionContext;
import org.codehaus.plexus.redback.rbac.RBACManager;
import org.codehaus.plexus.redback.rbac.UserAssignment;
import org.codehaus.plexus.redback.struts2.action.AbstractSecurityAction;
import org.codehaus.plexus.redback.system.SecuritySystem;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserQuery;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserQuery;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystem;
import org.codehaus.plexus.redback.system.SecuritySystemConstants;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.redback.integration.util.AutoLoginCookies;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.apache.commons.lang.StringUtils;
import org.apache.struts2.ServletActionContext;
import org.codehaus.plexus.redback.authentication.PasswordBasedAuthenticationDataSource;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystem;
import org.codehaus.plexus.redback.system.SecuritySystemConstants;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.redback.integration.checks.security.AdminAutoCreateCheck;
import org.codehaus.redback.integration.util.AutoLoginCookies;
import org.slf4j.Logger;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
+import org.apache.archiva.redback.users.UserManager;
import org.apache.struts2.ServletActionContext;
import org.codehaus.plexus.redback.configuration.UserConfiguration;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystem;
import org.codehaus.plexus.redback.system.SecuritySystemConstants;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
+import org.apache.archiva.redback.users.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.authentication.AuthenticationDataSource;
import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.authentication.AuthenticationResult;
import org.codehaus.plexus.redback.system.DefaultSecuritySession;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystem;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.XWorkTestCase;
*/
import net.sf.ehcache.CacheManager;
+import org.apache.archiva.redback.users.UserManager;
import org.apache.struts2.StrutsSpringTestCase;
import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.authentication.PasswordBasedAuthenticationDataSource;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystem;
import org.codehaus.plexus.redback.system.SecuritySystemConstants;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.users.memory.SimpleUser;
import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
-import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.JUnit4;
import java.util.Collections;
import com.google.common.collect.Lists;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionProxy;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.authorization.AuthorizationResult;
import org.codehaus.plexus.redback.policy.AccountLockedException;
import org.codehaus.plexus.redback.rbac.Role;
import org.codehaus.plexus.redback.struts2.model.ApplicationRoleDetails;
import org.codehaus.plexus.redback.struts2.model.ApplicationRoleDetails.RoleTableCell;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
import org.codehaus.redback.integration.interceptor.SecureActionBundle;
import org.codehaus.redback.integration.interceptor.SecureActionException;
import org.junit.Before;
*/
import com.opensymphony.xwork2.Action;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.authentication.AuthenticationResult;
import org.codehaus.plexus.redback.policy.AccountLockedException;
import org.codehaus.plexus.redback.system.DefaultSecuritySession;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.system.SecuritySystemConstants;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.users.memory.SimpleUser;
import org.codehaus.redback.integration.model.AdminEditUserCredentials;
import org.junit.After;
</requirements>
</component>
<component>
- <role>org.codehaus.plexus.redback.users.UserManager</role>
+ <role>org.apache.archiva.redback.users.UserManager</role>
<role-hint>cached</role-hint>
<implementation>org.codehaus.plexus.redback.users.cached.CachedUserManager</implementation>
<description>CachedUserManager</description>
<requirements>
<requirement>
- <role>org.codehaus.plexus.redback.users.UserManager</role>
+ <role>org.apache.archiva.redback.users.UserManager</role>
<role-hint>memory</role-hint>
<field-name>userImpl</field-name>
</requirement>
</requirements>
</component>
<component>
- <role>org.codehaus.plexus.redback.users.UserManager</role>
+ <role>org.apache.archiva.redback.users.UserManager</role>
<role-hint>cached</role-hint>
<implementation>org.codehaus.plexus.redback.users.cached.CachedUserManager</implementation>
<description>CachedUserManager</description>
<requirements>
<requirement>
- <role>org.codehaus.plexus.redback.users.UserManager</role>
+ <role>org.apache.archiva.redback.users.UserManager</role>
<role-hint>memory</role-hint>
<field-name>userImpl</field-name>
</requirement>
<!--
<component>
- <role>org.codehaus.plexus.redback.users.UserManager</role>
+ <role>org.apache.archiva.redback.users.UserManager</role>
<role-hint>cached</role-hint>
<implementation>org.codehaus.plexus.redback.users.cached.CachedUserManager</implementation>
<description>CachedUserManager</description>
<requirements>
<requirement>
- <role>org.codehaus.plexus.redback.users.UserManager</role>
+ <role>org.apache.archiva.redback.users.UserManager</role>
<role-hint>memory</role-hint>
<field-name>userImpl</field-name>
</requirement>
import org.codehaus.plexus.redback.keys.KeyNotFoundException;
import org.codehaus.plexus.redback.policy.AccountLockedException;
import org.codehaus.plexus.redback.policy.MustChangePasswordException;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
* limitations under the License.
*/
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
/**
* AccountLockedException
* under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.configuration.UserConfiguration;
import org.codehaus.plexus.redback.policy.rules.MustHavePasswordRule;
-import org.codehaus.plexus.redback.users.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
package org.codehaus.plexus.redback.policy;
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
/*
* Copyright 2001-2006 The Apache Software Foundation.
* limitations under the License.
*/
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
/**
* A Password Rule
* limitations under the License.
*/
-import org.codehaus.plexus.redback.users.Messages;
+import org.apache.archiva.redback.users.Messages;
import java.util.ArrayList;
import java.util.List;
* limitations under the License.
*/
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
+import org.apache.archiva.redback.users.User;
import java.util.List;
* anonymous users needs to occur before calling this method.
* <p/>
* This method does not persist the newly changed user password.
- * That will require a call to {@link UserManager#updateUser(User)}.
+ * That will require a call to {@link org.apache.archiva.redback.users.UserManager#updateUser(User)}.
*
* @param user the user password to validate, remember, and encode.
* @throws PasswordRuleViolationException if the new password violates the password rules
* limitations under the License.
*/
+import org.apache.archiva.redback.users.Messages;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang.StringUtils;
import org.codehaus.plexus.redback.policy.PasswordEncoder;
import org.codehaus.plexus.redback.policy.PasswordEncodingException;
-import org.codehaus.plexus.redback.users.Messages;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
* limitations under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.policy.PasswordRuleViolations;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.User;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import org.codehaus.plexus.redback.policy.PasswordRuleViolations;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
* limitations under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.policy.PasswordRuleViolations;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.User;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import org.codehaus.plexus.redback.policy.PasswordRuleViolations;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
* limitations under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.policy.PasswordRuleViolations;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.User;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import org.codehaus.plexus.redback.policy.PasswordRuleViolations;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import org.codehaus.plexus.redback.policy.PasswordRuleViolations;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
* under the License.
*/
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.authorization.AuthorizationDataSource;
import org.codehaus.plexus.redback.authorization.AuthorizationException;
import org.codehaus.plexus.redback.authorization.AuthorizationResult;
import org.codehaus.plexus.redback.rbac.RBACManager;
import org.codehaus.plexus.redback.rbac.RbacManagerException;
import org.codehaus.plexus.redback.rbac.RbacObjectNotFoundException;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
* under the License.
*/
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.rbac.Permission;
import org.codehaus.plexus.redback.rbac.Resource;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
import org.springframework.stereotype.Service;
import javax.inject.Inject;
* under the License.
*/
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
/**
* MemoryAuthorizationDataSource:
* under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.authentication.AuthenticationResult;
-import org.codehaus.plexus.redback.users.User;
import org.springframework.stereotype.Service;
import java.io.Serializable;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.authentication.AuthenticationDataSource;
import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.authentication.AuthenticationManager;
import org.codehaus.plexus.redback.policy.AccountLockedException;
import org.codehaus.plexus.redback.policy.MustChangePasswordException;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
*/
import org.codehaus.plexus.redback.authentication.AuthenticationResult;
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
import java.io.Serializable;
* under the License.
*/
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.authentication.AuthenticationDataSource;
import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.authorization.AuthorizationException;
import org.codehaus.plexus.redback.policy.AccountLockedException;
import org.codehaus.plexus.redback.policy.MustChangePasswordException;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserManager;
/**
* SecuritySystem:
* under the License.
*/
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.authentication.AuthenticationConstants;
import org.codehaus.plexus.redback.authentication.AuthenticationDataSource;
import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.policy.PasswordEncoder;
import org.codehaus.plexus.redback.policy.PolicyViolationException;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
-import javax.annotation.Resource;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.HashMap;
*/
import junit.framework.TestCase;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.authentication.AuthenticationResult;
import org.codehaus.plexus.redback.authentication.Authenticator;
import org.codehaus.plexus.redback.policy.AccountLockedException;
import org.codehaus.plexus.redback.policy.MustChangePasswordException;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+++ /dev/null
-package org.codehaus.plexus.redback.users;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * AbstractUserManager
- *
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- * @version $Id$
- */
-public abstract class AbstractUserManager
- implements UserManager
-{
- protected Logger log = LoggerFactory.getLogger( getClass() );
-
- private List<UserManagerListener> listeners = new ArrayList<UserManagerListener>();
-
- public void addUserManagerListener( UserManagerListener listener )
- {
- if ( !listeners.contains( listener ) )
- {
- listeners.add( listener );
- }
- }
-
- public void removeUserManagerListener( UserManagerListener listener )
- {
- listeners.remove( listener );
- }
-
- protected void fireUserManagerInit( boolean freshDatabase )
- {
- for ( UserManagerListener listener : listeners )
- {
- try
- {
- listener.userManagerInit( freshDatabase );
- }
- catch ( Exception e )
- {
- // Ignore
- }
- }
- }
-
- protected void fireUserManagerUserAdded( User addedUser )
- {
- for ( UserManagerListener listener : listeners )
- {
- try
- {
- listener.userManagerUserAdded( addedUser );
- }
- catch ( Exception e )
- {
- // Ignore
- }
- }
- }
-
- protected void fireUserManagerUserRemoved( User removedUser )
- {
- for ( UserManagerListener listener : listeners )
- {
- try
- {
- listener.userManagerUserRemoved( removedUser );
- }
- catch ( Exception e )
- {
- // Ignore
- }
- }
- }
-
- protected void fireUserManagerUserUpdated( User updatedUser )
- {
- for ( UserManagerListener listener : listeners )
- {
- try
- {
- listener.userManagerUserUpdated( updatedUser );
- }
- catch ( Exception e )
- {
- // Ignore
- }
- }
- }
-
- public User getGuestUser()
- throws UserNotFoundException
- {
- return findUser( GUEST_USERNAME );
- }
-
- public User createGuestUser()
- {
- try
- {
- User u = getGuestUser();
- if ( u != null )
- {
- return u;
- }
- }
- catch ( UserNotFoundException e )
- {
- //Nothing to do
- }
-
- User user = createUser( GUEST_USERNAME, "Guest", "" );
- user.setPermanent( true );
- user.setPasswordChangeRequired( false );
-
- user = addUser( user );
- return user;
- }
-}
+++ /dev/null
-package org.codehaus.plexus.redback.users;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * Abstract Implementation of UserQuery.
- * Intended to be subclassed by UserManager providers.
- */
-public abstract class AbstractUserQuery
- implements UserQuery
-{
-
- private String username;
-
- private String fullName;
-
- private String email;
-
- private long maxResults = -1;
-
- private long firstResult;
-
- private String orderBy = ORDER_BY_USERNAME;
-
- private boolean ascending = true;
-
- public String getUsername()
- {
- return username;
- }
-
- public void setUsername( String userName )
- {
- this.username = userName;
- }
-
- public String getFullName()
- {
- return fullName;
- }
-
- public void setFullName( String fullName )
- {
- this.fullName = fullName;
- }
-
- public String getEmail()
- {
- return email;
- }
-
- public void setEmail( String email )
- {
- this.email = email;
- }
-
- public long getFirstResult()
- {
- return firstResult;
- }
-
- public void setFirstResult( int firstResult )
- {
- this.firstResult = firstResult;
- }
-
- public long getMaxResults()
- {
- return maxResults;
- }
-
- public void setMaxResults( int maxResults )
- {
- this.maxResults = maxResults;
- }
-
- public String getOrderBy()
- {
- return orderBy;
- }
-
- public void setOrderBy( String orderBy )
- {
- if ( orderBy == null )
- {
- throw new IllegalArgumentException( "orderBy cannot be set to null" );
- }
- else if ( !ALLOWED_ORDER_FIELDS.contains( orderBy ) )
- {
- throw new IllegalArgumentException( orderBy + " is not an allowed orderBy field: " + orderBy );
- }
- this.orderBy = orderBy;
- }
-
- public boolean isAscending()
- {
- return ascending;
- }
-
- public void setAscending( boolean ascending )
- {
- this.ascending = ascending;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-package org.codehaus.plexus.redback.users;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Localized Message Handling.
- *
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- * @version $Id$
- */
-public class Messages
-{
- private static final String BUNDLE_NAME = "org.codehaus.plexus.redback.users.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
-
- /**
- * Get a Message as-is from the Resource Bundle.
- *
- * @param key the key for the message to get.
- * @return the value of the key, or "!key!" if the key is not found.
- */
- public static String getString( String key )
- {
- try
- {
- return RESOURCE_BUNDLE.getString( key );
- }
- catch ( MissingResourceException e )
- {
- return '!' + key + '!';
- }
- }
-
- /**
- * Gets a Message from the Resource Bundle, with {1} and {2} style arguments.
- *
- * @param key the key for the message to get.
- * @param arg the argument to pass in.
- * @return the value of the key, or "!key!" if the key is not found.
- */
- public static String getString( String key, Object arg )
- {
- return getString( key, new Object[] { arg } );
- }
-
- /**
- * Gets a Message from the Resource Bundle, with {1} and {2} style arguments.
- *
- * @param key the key for the message to get.
- * @param args the arguments to pass in.
- * @return the value of the key, or "!key!" if the key is not found.
- */
- public static String getString( String key, Object args[] )
- {
- try
- {
- String pattern = RESOURCE_BUNDLE.getString( key );
- return MessageFormat.format( pattern, args );
- }
- catch ( MissingResourceException e )
- {
- return '!' + key + '!';
- }
- }
-
- /**
- * Prevent Instantiation.
- */
- private Messages()
- {
- }
-}
+++ /dev/null
-package org.codehaus.plexus.redback.users;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * PermanentUserException - tossed when a forbidden action against a permanent user
- * occurs.
- *
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- * @version $Id$
- */
-public class PermanentUserException
- extends UserManagerException
-{
-
- public PermanentUserException()
- {
- super();
- }
-
- public PermanentUserException( String message, Throwable cause )
- {
- super( message, cause );
- }
-
- public PermanentUserException( String message )
- {
- super( message );
- }
-
- public PermanentUserException( Throwable cause )
- {
- super( cause );
- }
-}
+++ /dev/null
-package org.codehaus.plexus.redback.users;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-/**
- * The User Object.
- *
- * @author Jason van Zyl
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- */
-public interface User
- extends Serializable
-{
-
- /**
- * This is the object used to track the user within the provider.
- *
- * @return the principal for this user.
- */
- Object getPrincipal();
-
- // --------------------------------------------------------------------
- // Standard User Requirements.
- // --------------------------------------------------------------------
-
- /**
- * Gets the User Name for this user.
- * <p/>
- * This field is required, and should never be empty.
- *
- * @return the user name.
- */
- String getUsername();
-
- /**
- * Sets the User Name for this user.
- * <p/>
- * This field is required, and should never be empty.
- *
- * @param name the user name.
- */
- void setUsername( String name );
-
- /**
- * Gets the Full Name for this user.
- * <p/>
- * This field is required, and should never be empty.
- *
- * @return the full name.
- */
- String getFullName();
-
- /**
- * Sets the Full Name for this user.
- * <p/>
- * This field is required, and should never be empty.
- *
- * @param name the full name.
- */
- void setFullName( String name );
-
- /**
- * Gets the email address for this user.
- * <p/>
- * This field is required, and should never be empty.
- *
- * @return the email address.
- */
- String getEmail();
-
- /**
- * Sets the email address for this user.
- * <p/>
- * This field is required, and should never be empty.
- *
- * @param address the email address.
- */
- void setEmail( String address );
-
- // --------------------------------------------------------------------
- // Password Requirements.
- // --------------------------------------------------------------------
-
- /**
- * Gets the Raw (unencoded) Password.
- * Used only on password change requests.
- * <p/>
- * <p>
- * <b>Notes for User Providers</b>
- * </p>
- * <ol>
- * <li>
- * Providers need to look for a value in here to indicate if the user is
- * intending to change their password.
- * </li>
- * <li>
- * The providers of this interface need to use this field, encode the password, place it's value
- * into the encodedPassword field, and clear out the raw unencoded password field.
- * </li>
- * <li>
- * This field should never be stored on disk.
- * </li>
- * </ol>
- *
- * @return the raw encoded password.
- */
- String getPassword();
-
- /**
- * Sets the raw (unencoded) password for this user.
- *
- * @param rawPassword the raw unencoded password for this user.
- * @see #getPassword()
- */
- void setPassword( String rawPassword );
-
- /**
- * Gets the Encoded Password.
- *
- * @return the encoded password.
- */
- String getEncodedPassword();
-
- /**
- * Sets the Encoded Password.
- * <p/>
- * This field is populated by the {@link UserManager} process.
- *
- * @param encodedPassword
- */
- void setEncodedPassword( String encodedPassword );
-
- /**
- * Gets the Date of the Last Password Change.
- * <p/>
- * Used by password management policies to enforce password expiration rules.
- *
- * @return the date of the last password change.
- */
- Date getLastPasswordChange();
-
- /**
- * Sets the Last Password Change Date.
- * <p/>
- * This field is populated by the {@link UserManager} process.
- *
- * @param passwordChangeDate the date that the last password change occured.
- */
- void setLastPasswordChange( Date passwordChangeDate );
-
- /**
- * Gets the list of previous password (in encoded format).
- * <p/>
- * Used by password management policies to enforce password reuse rules.
- *
- * @return the list of {@link String} objects. Represents previous passwords (in encoded format).
- */
- List<String> getPreviousEncodedPasswords();
-
- /**
- * Sets the list of previous passwords (in encoded format)
- *
- * @param encodedPasswordList (list of {@link String} objects.) the previously passwords in encoded format.
- */
- void setPreviousEncodedPasswords( List<String> encodedPasswordList );
-
- /**
- * Add encoded password to previously passwords in encoded format.
- *
- * @param encodedPassword the encoded password to add.
- */
- void addPreviousEncodedPassword( String encodedPassword );
-
- // --------------------------------------------------------------------
- // State
- // --------------------------------------------------------------------
-
- /**
- * Gets the flag indicating if this user is a permanent user or not.
- * <p/>
- * Usually Root / Admin / Guest users are flagged as such.
- */
- boolean isPermanent();
-
- /**
- * Sets the permanent flag for this user.
- * <p/>
- * Users such as Root / Admin / Guest are typically flagged as permanent.
- *
- * @param permanent true if permanent.
- */
- void setPermanent( boolean permanent );
-
- /**
- * Determines if this user account is locked from use or not.
- * <p/>
- * This state is set from an administrative point of view, or due to
- * excessive failed login attempts.
- *
- * @return true if account is locked.
- */
- boolean isLocked();
-
- /**
- * Sets the locked state of this account.
- *
- * @param locked true if account is to be locked.
- */
- void setLocked( boolean locked );
-
- /**
- * Determines if this user account must change their password on next login.
- *
- * @return true if user must change password on next login.
- */
- boolean isPasswordChangeRequired();
-
- /**
- * Sets the flag to indicate if this user must change their password on next login.
- *
- * @param changeRequired true if user must change password on next login.
- */
- void setPasswordChangeRequired( boolean changeRequired );
-
- /**
- * Gets the flag indicating if this user has been validated (or not)
- *
- * @return true if validated.
- */
- boolean isValidated();
-
- /**
- * Sets the flag indicating if this user has been validated (or not)
- *
- * @param valid true if validated.
- */
- void setValidated( boolean valid );
-
- // --------------------------------------------------------------------
- // Statistics
- // --------------------------------------------------------------------
-
- /**
- * Get Count of Failed Login Attempts.
- *
- * @return the count of failed login attempts.
- */
- int getCountFailedLoginAttempts();
-
- /**
- * Set the count of failed login attempts.
- *
- * @param count the count of failed login attempts.
- */
- void setCountFailedLoginAttempts( int count );
-
- /**
- * Get the Creation Date for this account.
- *
- * @return the date of creation for this account.
- */
- Date getAccountCreationDate();
-
- /**
- * Set the Creation Date for this account.
- */
- void setAccountCreationDate( Date date );
-
- /**
- * Get the Last Successful Login Date for this account.
- *
- * @return the date of the last successful login
- */
- Date getLastLoginDate();
-
- /**
- * Sets the Last Successful Login Date for this account.
- */
- void setLastLoginDate( Date date );
-}
+++ /dev/null
-package org.codehaus.plexus.redback.users;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.List;
-
-/**
- * User Manager Interface
- *
- * @author Jason van Zyl
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- */
-public interface UserManager
-{
-
- static final String GUEST_USERNAME = "guest";
-
- /**
- * Is the UserManager read only? if so then create and modify actions are to be disabled
- *
- * @return boolean true if user manager is disabled
- */
- boolean isReadOnly();
-
- /**
- * An Identifier for the UserManager.
- *
- * @return the user manager identifier.
- */
- String getId();
-
- /**
- * Add a {@link UserManagerListener} to track major events in the
- * UserManager.
- *
- * @param listener the listener to add.
- */
- void addUserManagerListener( UserManagerListener listener );
-
- /**
- * Remove a {@link UserManagerListener} from the collection of listeners.
- *
- * @param listener the listener to remove.
- */
- void removeUserManagerListener( UserManagerListener listener );
-
- /**
- * Factory method to create new User Objects based on provider specific
- * implementation.
- * <p/>
- * User objects created this way do not exist in the provider's underlying
- * data store until a call to {@link #addUser(User)} is made.
- *
- * @param username the username for this user.
- * @param fullName the full name for this user.
- * @param emailAddress the email address for this user.
- * @return the new user object ready to use.
- */
- User createUser( String username, String fullName, String emailAddress );
-
- /**
- * Factory method to create the guest user.
- *
- * @return The guest user
- */
- User createGuestUser();
-
- /**
- * Factory method to create {@link UserQuery}s based on provider specific
- * implementations.
- *
- * @return the provider implementation of UserQuery
- */
- UserQuery createUserQuery();
-
- /**
- * Get the List of {@link User} objects.
- *
- * @return the List of {@link User} Objects.
- */
- List<User> getUsers();
-
- List<User> getUsers( boolean orderAscending );
-
- /**
- * Add a User.
- *
- * @param user the user to add.
- * @return the user that was just added.
- */
- User addUser( User user );
-
- /**
- * Update a User.
- *
- * @param user the user to update.
- * @return the user that was just updated.
- * @throws UserNotFoundException if the user was not found to update.
- */
- User updateUser( User user )
- throws UserNotFoundException;
-
- /**
- * Find a User using a User name.
- *
- * @param username the username to find.
- * @return the user.
- * @throws UserNotFoundException if the user was not found.
- */
- User findUser( String username )
- throws UserNotFoundException;
-
- /**
- * Get the guest user.
- *
- * @return the guest user.
- */
- User getGuestUser()
- throws UserNotFoundException;
-
- List<User> findUsersByUsernameKey( String usernameKey, boolean orderAscending );
-
- List<User> findUsersByFullNameKey( String fullNameKey, boolean orderAscending );
-
- List<User> findUsersByEmailKey( String emailKey, boolean orderAscending );
-
- /**
- * Find users matching properties, ordering and range as specified by the
- * {@link UserQuery}.
- *
- * @param query the query.
- * @return a List of {@link User} objects.
- */
- List<User> findUsersByQuery( UserQuery query );
-
- /**
- * Find a User using the principal.
- *
- * @param principal the principal to look for.
- * @return the user.
- * @throws UserNotFoundException if the user was not found.
- */
- User findUser( Object principal )
- throws UserNotFoundException;
-
- /**
- * true if the user exists, false if it doesn't
- *
- * @param principal
- * @return true, if user exists
- */
- boolean userExists( Object principal );
-
- /**
- * Delete a user using the principal.
- *
- * @param principal the principal to look for.
- * @throws UserNotFoundException the user was not found.
- */
- void deleteUser( Object principal )
- throws UserNotFoundException;
-
- /**
- * Delete a user using the username.
- *
- * @param username the username to look for.
- * @throws UserNotFoundException the user was not found.
- */
- void deleteUser( String username )
- throws UserNotFoundException;
-
- /**
- * Add a user to the database without checking for consistency or adjusting the password. Should only be used for
- * re-importing known-good data.
- *
- * @param user the user to add
- */
- void addUserUnchecked( User user );
-
- void eraseDatabase();
-
- User updateUser( User user, boolean passwordChangeRequired )
- throws UserNotFoundException;
-}
+++ /dev/null
-package org.codehaus.plexus.redback.users;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * UserManagerException
- *
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- * @version $Id$
- */
-public class UserManagerException
- extends RuntimeException
-{
-
- public UserManagerException()
- {
- super();
- }
-
- public UserManagerException( String message, Throwable cause )
- {
- super( message, cause );
- }
-
- public UserManagerException( String message )
- {
- super( message );
- }
-
- public UserManagerException( Throwable cause )
- {
- super( cause );
- }
-}
+++ /dev/null
-package org.codehaus.plexus.redback.users;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * UserManagerListener
- *
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- * @version $Id$
- */
-public interface UserManagerListener
-{
- void userManagerInit( boolean freshDatabase );
-
- void userManagerUserAdded( User user );
-
- void userManagerUserRemoved( User user );
-
- void userManagerUserUpdated( User user );
-}
+++ /dev/null
-package org.codehaus.plexus.redback.users;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * @author Jason van Zyl
- */
-public class UserNotFoundException
- extends Exception
-{
- public UserNotFoundException( String string )
- {
- super( string );
- }
-
- public UserNotFoundException( String string, Throwable throwable )
- {
- super( string, throwable );
- }
-
- public UserNotFoundException( Throwable throwable )
- {
- super( throwable );
- }
-}
+++ /dev/null
-package org.codehaus.plexus.redback.users;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-
-public interface UserQuery
-{
- final static String ORDER_BY_USERNAME = "username";
-
- final static String ORDER_BY_FULLNAME = "fullname";
-
- final static String ORDER_BY_EMAIL = "email";
-
- final static Set<String> ALLOWED_ORDER_FIELDS =
- new HashSet<String>( Arrays.asList( ORDER_BY_USERNAME, ORDER_BY_FULLNAME, ORDER_BY_EMAIL ) );
-
- /**
- * Returns the case insensitive substring user name criteria.
- *
- * @return the username criteria.
- */
- String getUsername();
-
- /**
- * Sets the case insensitive substring user name criteria.
- *
- * @param userName the username criteria
- */
- void setUsername( String userName );
-
- /**
- * Returns the case insensitive substring full name criteria.
- *
- * @return the username criteria.
- */
- String getFullName();
-
- /**
- * Sets the case insensitive substring full name criteria.
- *
- * @param fullName the full name criteria
- */
- void setFullName( String fullName );
-
- /**
- * Returns the case insensitive substring email criteria.
- *
- * @return the email criteria.
- */
- String getEmail();
-
- /**
- * Sets the case insensitive substring email criteria.
- *
- * @param email the email criteria
- */
- void setEmail( String email );
-
- /**
- * Returns the index (zero based) of the first result to include. Useful for paging.
- *
- * @return the first index
- */
- long getFirstResult();
-
- /**
- * Sets the index (zero based) of the first result to include. Useful for paging.
- *
- * @param firstResult the first index
- */
- void setFirstResult( int firstResult );
-
- /**
- * Returns the maximum number of users to return.
- *
- * @return the maximum number of users to return.
- */
- long getMaxResults();
-
- /**
- * Sets the maximum number of users to return.
- *
- * @param maxResults the maximum number of users to return.
- */
- void setMaxResults( int maxResults );
-
- /**
- * Returns the property used to order the results of this query.
- * This is one of {@link #ORDER_BY_USERNAME}, {@link #ORDER_BY_FULLNAME} or {@link #ORDER_BY_EMAIL}.
- *
- * @return the order property.
- */
- String getOrderBy();
-
- /**
- * Sets the property used to order the results of this query.
- * This is one of {@link #ORDER_BY_USERNAME}, {@link #ORDER_BY_FULLNAME} or {@link #ORDER_BY_EMAIL}.
- *
- * @param orderBy the order property.
- */
- void setOrderBy( String orderBy );
-
- /**
- * Returns true if the results should be returned in ascending order.
- *
- * @return ascending
- */
- boolean isAscending();
-
- /**
- * Set this to true if the results should be returned in ascending order.
- *
- * @param ascending true if the results should be returned in ascending
- */
- void setAscending( boolean ascending );
-}
* under the License.
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManagerListener;
+import org.apache.archiva.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserQuery;
import org.codehaus.plexus.cache.Cache;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserManagerListener;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
-import org.codehaus.plexus.redback.users.UserQuery;
+import org.apache.archiva.redback.users.UserManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import net.sf.ehcache.CacheManager;
-import org.codehaus.plexus.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.redback.users.provider.test.AbstractUserManagerTestCase;
import org.junit.After;
import org.junit.AfterClass;
* limitations under the License.
*/
+import org.apache.archiva.redback.users.AbstractUserManager;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.configuration.UserConfiguration;
-import org.codehaus.plexus.redback.users.AbstractUserManager;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
-import org.codehaus.plexus.redback.users.UserQuery;
+import org.apache.archiva.redback.users.UserQuery;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
* under the License.
*/
+import org.apache.archiva.redback.users.AbstractUserManager;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManagerException;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.jdo.JdoFactory;
import org.codehaus.plexus.jdo.PlexusJdoUtils;
import org.codehaus.plexus.jdo.PlexusObjectNotFoundException;
import org.codehaus.plexus.jdo.PlexusStoreException;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.AbstractUserManager;
-import org.codehaus.plexus.redback.users.PermanentUserException;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManagerException;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
-import org.codehaus.plexus.redback.users.UserQuery;
+import org.apache.archiva.redback.users.PermanentUserException;
+import org.apache.archiva.redback.users.UserQuery;
import org.codehaus.plexus.util.StringUtils;
import org.jpox.JDOClassLoaderResolver;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
-import javax.annotation.Resource;
import javax.inject.Inject;
import javax.inject.Named;
import javax.jdo.Extent;
* under the License.
*/
-import org.codehaus.plexus.redback.users.AbstractUserQuery;
-import org.codehaus.plexus.redback.users.UserQuery;
+import org.apache.archiva.redback.users.AbstractUserQuery;
+import org.apache.archiva.redback.users.UserQuery;
import org.codehaus.plexus.util.StringUtils;
import java.util.ArrayList;
<name>JdoUser</name>
<version>1.0.0+</version>
<interfaces>
- <interface>org.codehaus.plexus.redback.users.User</interface>
+ <interface>org.apache.archiva.redback.users.User</interface>
</interfaces>
<description></description>
<fields>
import org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory;
import org.codehaus.plexus.redback.common.jdo.test.StoreManagerDebug;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.users.provider.test.AbstractUserManagerTestCase;
import org.jpox.AbstractPersistenceManagerFactory;
import org.jpox.SchemaTool;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;
import java.net.URL;
-import java.util.Arrays;
-import java.util.List;
import java.util.Map;
import java.util.Properties;
*/
+import org.apache.archiva.redback.users.AbstractUserManager;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.common.ldap.LdapUser;
import org.codehaus.plexus.redback.common.ldap.MappingException;
import org.codehaus.plexus.redback.common.ldap.UserMapper;
import org.codehaus.plexus.redback.common.ldap.connection.LdapConnection;
import org.codehaus.plexus.redback.common.ldap.connection.LdapConnectionFactory;
import org.codehaus.plexus.redback.common.ldap.connection.LdapException;
-import org.codehaus.plexus.redback.users.AbstractUserManager;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
-import org.codehaus.plexus.redback.users.UserQuery;
+import org.apache.archiva.redback.users.UserQuery;
import org.codehaus.plexus.redback.users.ldap.ctl.LdapController;
import org.codehaus.plexus.redback.users.ldap.ctl.LdapControllerException;
import org.codehaus.plexus.redback.users.ldap.service.LdapCacheService;
}
/**
- * @see org.codehaus.plexus.redback.users.UserManager#findUsersByUsernameKey(java.lang.String, boolean)
+ * @see org.apache.archiva.redback.users.UserManager#findUsersByUsernameKey(java.lang.String, boolean)
*/
public List<User> findUsersByUsernameKey( String usernameKey, boolean orderAscending )
{
}
/**
- * @see org.codehaus.plexus.redback.users.UserManager#getUsers()
+ * @see org.apache.archiva.redback.users.UserManager#getUsers()
*/
public List<User> getUsers()
{
*/
import org.codehaus.plexus.redback.common.ldap.UserMapper;
-import org.codehaus.plexus.redback.users.AbstractUserQuery;
+import org.apache.archiva.redback.users.AbstractUserQuery;
public class LdapUserQuery
extends AbstractUserQuery
import java.util.List;
import java.util.Set;
-import javax.annotation.Resource;
import javax.inject.Inject;
import javax.inject.Named;
import javax.naming.NamingEnumeration;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.redback.common.ldap.LdapUser;
import org.codehaus.plexus.redback.common.ldap.LdapUserMapper;
import org.codehaus.plexus.redback.common.ldap.MappingException;
import org.codehaus.plexus.redback.common.ldap.UserMapper;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
import org.codehaus.plexus.redback.users.ldap.LdapUserQuery;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
/**
- * @see org.codehaus.plexus.redback.users.ldap.ctl.LdapControllerI#updateUser(org.codehaus.plexus.redback.users.User, javax.naming.directory.DirContext)
+ * @see org.codehaus.plexus.redback.users.ldap.ctl.LdapControllerI#updateUser(org.apache.archiva.redback.users.User, javax.naming.directory.DirContext)
*/
public void updateUser( User user, DirContext context )
throws LdapControllerException, MappingException
}
/**
- * @see org.codehaus.plexus.redback.users.ldap.ctl.LdapControllerI#createUser(org.codehaus.plexus.redback.users.User, javax.naming.directory.DirContext, boolean)
+ * @see org.codehaus.plexus.redback.users.ldap.ctl.LdapControllerI#createUser(org.apache.archiva.redback.users.User, javax.naming.directory.DirContext, boolean)
*/
public void createUser( User user, DirContext context, boolean encodePasswordIfChanged )
throws LdapControllerException, MappingException
* under the License.
*/
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.common.ldap.LdapUser;
import org.codehaus.plexus.redback.common.ldap.MappingException;
-import org.codehaus.plexus.redback.users.User;
import org.codehaus.plexus.redback.users.ldap.LdapUserQuery;
import javax.naming.directory.DirContext;
*/
import junit.framework.TestCase;
+import org.apache.archiva.redback.users.User;
import org.codehaus.plexus.redback.common.ldap.connection.LdapConnection;
import org.codehaus.plexus.redback.common.ldap.connection.LdapConnectionFactory;
import org.codehaus.plexus.redback.policy.PasswordEncoder;
import org.codehaus.plexus.redback.policy.encoders.SHA1PasswordEncoder;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.users.ldap.service.LdapCacheService;
import org.codehaus.redback.components.apacheds.ApacheDs;
import org.junit.After;
* under the License.
*/
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.AbstractUserManager;
-import org.codehaus.plexus.redback.users.PermanentUserException;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserQuery;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.AbstractUserManager;
+import org.apache.archiva.redback.users.PermanentUserException;
+import org.apache.archiva.redback.users.UserQuery;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.users.memory.util.UserSorter;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
* under the License.
*/
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
import java.io.Serializable;
import java.util.ArrayList;
* under the License.
*/
-import org.codehaus.plexus.redback.users.AbstractUserQuery;
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.AbstractUserQuery;
+import org.apache.archiva.redback.users.User;
import java.util.Comparator;
* under the License.
*/
-import org.codehaus.plexus.redback.users.User;
+import org.apache.archiva.redback.users.User;
import java.util.Comparator;
* under the License.
*/
+import org.apache.archiva.redback.users.UserManager;
import org.codehaus.plexus.redback.users.memory.MemoryUserManager;
import org.codehaus.plexus.redback.users.provider.test.AbstractUserManagerTestCase;
import org.junit.Before;
*/
import junit.framework.TestCase;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserNotFoundException;
+import org.apache.archiva.redback.users.UserQuery;
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
-import org.codehaus.plexus.redback.users.PermanentUserException;
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManager;
-import org.codehaus.plexus.redback.users.UserNotFoundException;
-import org.codehaus.plexus.redback.users.UserQuery;
+import org.apache.archiva.redback.users.PermanentUserException;
+import org.apache.archiva.redback.users.UserManager;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
* under the License.
*/
-import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.redback.users.UserManagerListener;
+import org.apache.archiva.redback.users.UserManagerListener;
+import org.apache.archiva.redback.users.User;
import java.util.ArrayList;
import java.util.List;