start moving package to org.apache.archiva namespace

git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1310759 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-04-07 13:12:48 +00:00
parent 06438cf324
commit 3b0ae7e689
108 changed files with 215 additions and 1408 deletions

View File

@ -19,7 +19,7 @@ package org.codehaus.plexus.redback.authorization;
* under the License.
*/
import org.codehaus.plexus.redback.users.User;
import org.apache.archiva.redback.users.User;
/**
* @author Jason van Zyl

View File

@ -19,7 +19,7 @@ package org.codehaus.plexus.redback.common.ldap;
* 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;

View File

@ -19,8 +19,8 @@ package org.codehaus.plexus.redback.common.ldap;
* 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;

View File

@ -19,7 +19,7 @@ package org.codehaus.plexus.redback.common.ldap;
* under the License.
*/
import org.codehaus.plexus.redback.users.User;
import org.apache.archiva.redback.users.User;
import javax.naming.directory.Attributes;

View File

@ -19,10 +19,10 @@ package org.codehaus.plexus.redback.management;
* 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;

View File

@ -34,6 +34,7 @@ import java.util.Map;
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;
@ -50,8 +51,7 @@ import org.codehaus.plexus.redback.rbac.UserAssignment;
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;

View File

@ -20,6 +20,7 @@ package org.codehaus.plexus.redback.management;
*/
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;
@ -31,8 +32,7 @@ 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.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;

View File

@ -19,6 +19,7 @@ package org.codehaus.redback.integration.checks.security;
* 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;
@ -30,9 +31,8 @@ import org.codehaus.plexus.redback.role.RoleManagerException;
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;

View File

@ -19,14 +19,14 @@ package org.codehaus.redback.integration.checks.security;
* 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;

View File

@ -19,13 +19,13 @@ package org.codehaus.redback.integration.checks.security;
* 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;

View File

@ -19,6 +19,8 @@ package org.codehaus.redback.integration.filter.authentication;
* 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;
@ -27,8 +29,6 @@ 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.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;

View File

@ -19,15 +19,15 @@ package org.codehaus.redback.integration.filter.authentication.digest;
* 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;

View File

@ -19,7 +19,7 @@ package org.codehaus.redback.integration.model;
* under the License.
*/
import org.codehaus.plexus.redback.users.User;
import org.apache.archiva.redback.users.User;
/**
* AdminEditUserCredentials

View File

@ -19,7 +19,7 @@ package org.codehaus.redback.integration.model;
* under the License.
*/
import org.codehaus.plexus.redback.users.User;
import org.apache.archiva.redback.users.User;
import org.codehaus.redback.integration.util.DateUtils;
/**

View File

@ -19,8 +19,8 @@ package org.codehaus.redback.integration.model;
* 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;

View File

@ -18,14 +18,14 @@ package org.codehaus.redback.integration.reports;
* 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;

View File

@ -19,11 +19,11 @@ package org.codehaus.redback.integration.reports;
* 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;

View File

@ -19,7 +19,7 @@ package org.codehaus.redback.integration.taglib.jsp;
* 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;

View File

@ -19,7 +19,7 @@ package org.codehaus.redback.integration.taglib.jsp;
* 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;

View File

@ -21,7 +21,7 @@ package org.codehaus.redback.integration.util;
import java.util.Comparator;
import org.codehaus.plexus.redback.users.User;
import org.apache.archiva.redback.users.User;
/**
* UserComparator

View File

@ -23,15 +23,15 @@ import java.util.HashSet;
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;

View File

@ -20,6 +20,7 @@ package org.codehaus.redback.jsecurity;
*/
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;
@ -27,8 +28,7 @@ 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.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;

View File

@ -82,7 +82,7 @@ public class User
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() );

View File

@ -18,6 +18,7 @@ package org.codehaus.redback.rest.services;
* 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;
@ -29,7 +30,6 @@ 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.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;
@ -130,7 +130,7 @@ public class DefaultLoginService
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() );
@ -186,7 +186,7 @@ public class DefaultLoginService
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() );

View File

@ -18,6 +18,7 @@ package org.codehaus.redback.rest.services;
* 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;
@ -25,8 +26,7 @@ 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.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;

View File

@ -18,6 +18,9 @@ package org.codehaus.redback.rest.services;
* 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;
@ -29,9 +32,6 @@ import org.codehaus.plexus.redback.role.RoleManagerException;
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;

View File

@ -20,6 +20,8 @@ package org.codehaus.redback.rest.services;
*/
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;
@ -40,8 +42,6 @@ import org.codehaus.plexus.redback.rbac.UserAssignment;
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;
@ -143,7 +143,7 @@ public class DefaultUserService
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(
@ -172,7 +172,7 @@ public class DefaultUserService
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() );
@ -246,7 +246,7 @@ public class DefaultUserService
{
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 )
@ -258,10 +258,10 @@ public class DefaultUserService
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 ) );
}
@ -339,7 +339,7 @@ public class DefaultUserService
{
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() );
@ -391,7 +391,7 @@ public class DefaultUserService
{
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 )
@ -412,7 +412,7 @@ public class DefaultUserService
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() );
@ -445,7 +445,7 @@ public class DefaultUserService
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 )
{
@ -462,7 +462,7 @@ public class DefaultUserService
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() );
@ -514,7 +514,7 @@ public class DefaultUserService
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() );
@ -567,7 +567,7 @@ public class DefaultUserService
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 );
@ -633,7 +633,7 @@ public class DefaultUserService
{
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 );
@ -827,7 +827,7 @@ public class DefaultUserService
{
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() );

View File

@ -18,7 +18,7 @@ package org.codehaus.redback.rest.services;
* under the License.
*/
import org.codehaus.plexus.redback.users.User;
import org.apache.archiva.redback.users.User;
/**
* @author Olivier Lamy

View File

@ -20,6 +20,8 @@ package org.codehaus.redback.rest.services.interceptors;
*/
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;
@ -29,9 +31,7 @@ import org.codehaus.plexus.redback.authorization.RedbackAuthorization;
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;

View File

@ -18,12 +18,12 @@ package org.codehaus.redback.rest.services.utils;
* 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;

View File

@ -19,13 +19,10 @@ package org.codehaus.redback.rest.services;
* 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;

View File

@ -19,6 +19,7 @@ package org.codehaus.plexus.redback.struts2.action;
* 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;
@ -26,10 +27,8 @@ import org.codehaus.plexus.redback.rbac.RbacManagerException;
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;

View File

@ -19,14 +19,14 @@ package org.codehaus.plexus.redback.struts2.action;
* 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;

View File

@ -19,6 +19,7 @@ package org.codehaus.plexus.redback.struts2.action;
* 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;
@ -34,8 +35,7 @@ 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.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;

View File

@ -19,13 +19,13 @@ package org.codehaus.plexus.redback.struts2.action;
* 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;

View File

@ -19,14 +19,14 @@ package org.codehaus.plexus.redback.struts2.action;
* 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;

View File

@ -19,14 +19,14 @@ package org.codehaus.plexus.redback.struts2.action;
* 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;

View File

@ -19,6 +19,7 @@ package org.codehaus.plexus.redback.struts2.action.admin;
* 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;
@ -32,9 +33,8 @@ import org.codehaus.plexus.redback.role.RoleManager;
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;

View File

@ -19,6 +19,8 @@ package org.codehaus.plexus.redback.struts2.action.admin;
* 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;
@ -30,9 +32,7 @@ import org.codehaus.plexus.redback.struts2.action.AbstractUserCredentialsAction;
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;
@ -45,7 +45,6 @@ import javax.inject.Inject;
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;

View File

@ -26,7 +26,7 @@ import org.codehaus.plexus.redback.management.DataManagementTool;
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;

View File

@ -19,6 +19,7 @@ package org.codehaus.plexus.redback.struts2.action.admin;
* 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;
@ -27,13 +28,11 @@ import org.codehaus.plexus.redback.rbac.Role;
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;

View File

@ -25,8 +25,8 @@ import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
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;

View File

@ -19,6 +19,8 @@ package org.codehaus.plexus.redback.struts2.action.admin;
* 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;
@ -27,9 +29,7 @@ import org.codehaus.plexus.redback.rbac.Resource;
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;

View File

@ -19,6 +19,8 @@ package org.codehaus.plexus.redback.struts2.action.admin;
* 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;
@ -31,9 +33,7 @@ import org.codehaus.plexus.redback.struts2.action.CancellableAction;
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;

View File

@ -19,6 +19,7 @@ package org.codehaus.plexus.redback.struts2.action.admin;
* 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;
@ -29,9 +30,8 @@ import org.codehaus.plexus.redback.rbac.Role;
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;

View File

@ -32,7 +32,7 @@ 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.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;

View File

@ -21,6 +21,8 @@ package org.codehaus.plexus.redback.struts2.interceptor;
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;
@ -30,9 +32,7 @@ import org.codehaus.plexus.redback.role.RoleManagerException;
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;

View File

@ -25,6 +25,7 @@ import java.util.Map;
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;
@ -32,8 +33,7 @@ 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.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;

View File

@ -27,6 +27,7 @@ import static org.easymock.EasyMock.verify;
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;
@ -38,7 +39,6 @@ import org.codehaus.plexus.redback.policy.UserValidationSettings;
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;

View File

@ -20,6 +20,7 @@ package org.codehaus.plexus.redback.struts2.action.admin;
*/
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;
@ -34,14 +35,12 @@ import org.codehaus.plexus.redback.struts2.action.AbstractUserCredentialsAction;
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;

View File

@ -22,6 +22,7 @@ package org.codehaus.plexus.redback.struts2.action.admin;
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;
@ -31,7 +32,6 @@ import org.codehaus.plexus.redback.rbac.RbacObjectInvalidException;
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;

View File

@ -20,6 +20,8 @@ package org.codehaus.plexus.redback.struts2.action.admin;
*/
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;
@ -31,8 +33,6 @@ import org.codehaus.plexus.redback.rbac.Role;
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;

View File

@ -69,13 +69,13 @@
</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>

View File

@ -69,13 +69,13 @@
</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>

View File

@ -98,13 +98,13 @@
<!--
<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>

View File

@ -30,9 +30,9 @@ import org.codehaus.plexus.redback.keys.KeyManagerException;
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;

View File

@ -16,7 +16,7 @@ package org.codehaus.plexus.redback.policy;
* limitations under the License.
*/
import org.codehaus.plexus.redback.users.User;
import org.apache.archiva.redback.users.User;
/**
* AccountLockedException

View File

@ -19,9 +19,9 @@ package org.codehaus.plexus.redback.policy;
* 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;

View File

@ -1,6 +1,6 @@
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.

View File

@ -16,7 +16,7 @@ package org.codehaus.plexus.redback.policy;
* limitations under the License.
*/
import org.codehaus.plexus.redback.users.User;
import org.apache.archiva.redback.users.User;
/**
* A Password Rule

View File

@ -16,7 +16,7 @@ package org.codehaus.plexus.redback.policy;
* 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;

View File

@ -16,8 +16,7 @@ package org.codehaus.plexus.redback.policy;
* 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;
@ -174,7 +173,7 @@ public interface UserSecurityPolicy
* 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

View File

@ -16,11 +16,11 @@ package org.codehaus.plexus.redback.policy.encoders;
* 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;

View File

@ -16,9 +16,9 @@ package org.codehaus.plexus.redback.policy.rules;
* 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;

View File

@ -18,7 +18,7 @@ package org.codehaus.plexus.redback.policy.rules;
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;

View File

@ -16,9 +16,9 @@ package org.codehaus.plexus.redback.policy.rules;
* 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;

View File

@ -18,7 +18,7 @@ package org.codehaus.plexus.redback.policy.rules;
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;

View File

@ -16,9 +16,9 @@ package org.codehaus.plexus.redback.policy.rules;
* 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;

View File

@ -18,7 +18,7 @@ package org.codehaus.plexus.redback.policy.rules;
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;

View File

@ -18,7 +18,7 @@ package org.codehaus.plexus.redback.policy.rules;
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;

View File

@ -19,6 +19,7 @@ package org.codehaus.plexus.redback.authorization.rbac;
* 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;
@ -30,9 +31,8 @@ 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.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;

View File

@ -19,10 +19,10 @@ package org.codehaus.plexus.redback.authorization.rbac.evaluator;
* 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;

View File

@ -19,7 +19,7 @@ package org.codehaus.plexus.redback.rbac.memory;
* under the License.
*/
import org.codehaus.plexus.redback.users.User;
import org.apache.archiva.redback.users.User;
/**
* MemoryAuthorizationDataSource:

View File

@ -19,8 +19,8 @@ package org.codehaus.plexus.redback.system;
* 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;

View File

@ -19,6 +19,9 @@ package org.codehaus.plexus.redback.system;
* 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;
@ -31,9 +34,6 @@ import org.codehaus.plexus.redback.keys.KeyManager;
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;

View File

@ -20,7 +20,7 @@ package org.codehaus.plexus.redback.system;
*/
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;

View File

@ -19,6 +19,7 @@ package org.codehaus.plexus.redback.system;
* 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;
@ -27,8 +28,7 @@ import org.codehaus.plexus.redback.keys.KeyManager;
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:

View File

@ -19,6 +19,8 @@ package org.codehaus.plexus.redback.authentication.users;
* 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;
@ -30,14 +32,11 @@ import org.codehaus.plexus.redback.policy.MustChangePasswordException;
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;

View File

@ -20,6 +20,9 @@ package org.codehaus.plexus.redback.authentication.users;
*/
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;
@ -27,9 +30,6 @@ import org.codehaus.plexus.redback.authentication.PasswordBasedAuthenticationDat
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;

View File

@ -1,142 +0,0 @@
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;
}
}

View File

@ -1,122 +0,0 @@
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;
}
}

View File

@ -1,94 +0,0 @@
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()
{
}
}

View File

@ -1,52 +0,0 @@
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 );
}
}

View File

@ -1,301 +0,0 @@
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 );
}

View File

@ -1,201 +0,0 @@
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;
}

View File

@ -1,51 +0,0 @@
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 );
}
}

View File

@ -1,37 +0,0 @@
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 );
}

View File

@ -1,42 +0,0 @@
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 );
}
}

View File

@ -1,137 +0,0 @@
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 );
}

View File

@ -19,12 +19,12 @@ package org.codehaus.plexus.redback.users.cached;
* 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;

View File

@ -21,7 +21,7 @@ package org.codehaus.plexus.redback.users.cached;
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;

View File

@ -16,12 +16,12 @@ package org.codehaus.plexus.redback.users.configurable;
* 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;

View File

@ -19,23 +19,22 @@ package org.codehaus.plexus.redback.users.jdo;
* 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;

View File

@ -19,8 +19,8 @@ package org.codehaus.plexus.redback.users.jdo;
* 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;

View File

@ -49,7 +49,7 @@
<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>

View File

@ -21,8 +21,6 @@ package org.codehaus.plexus.redback.users.jdo;
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;
@ -33,8 +31,6 @@ import javax.inject.Named;
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;

View File

@ -20,16 +20,16 @@ package org.codehaus.plexus.redback.users.ldap;
*/
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;
@ -343,7 +343,7 @@ public class LdapUserManager
}
/**
* @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 )
{
@ -360,7 +360,7 @@ public class LdapUserManager
}
/**
* @see org.codehaus.plexus.redback.users.UserManager#getUsers()
* @see org.apache.archiva.redback.users.UserManager#getUsers()
*/
public List<User> getUsers()
{

View File

@ -20,7 +20,7 @@ package org.codehaus.plexus.redback.users.ldap;
*/
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

View File

@ -25,7 +25,6 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import javax.annotation.Resource;
import javax.inject.Inject;
import javax.inject.Named;
import javax.naming.NamingEnumeration;
@ -34,12 +33,12 @@ import javax.naming.directory.DirContext;
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;
@ -70,7 +69,7 @@ public class DefaultLdapController
}
/**
* @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
@ -233,7 +232,7 @@ public class DefaultLdapController
}
/**
* @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

View File

@ -19,9 +19,9 @@ package org.codehaus.plexus.redback.users.ldap.ctl;
* 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;

Some files were not shown because too many files have changed in this diff Show More