* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import org.wamblee.security.encryption.MessageDigester;
-import static org.wamblee.usermgt.UserMgtException.Reason.DUPLICATE_USER;
+
+import static org.wamblee.security.authentication.UserMgtException.Reason.*;
/**
* User set base class.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import java.io.Serializable;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import java.util.Set;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import java.util.ArrayList;
import java.util.List;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import org.wamblee.security.encryption.MessageDigester;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import java.security.AccessController;
import java.security.Principal;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
/**
* Validator of names.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
-import org.wamblee.usermgt.UserMgtException.Reason;
+import org.wamblee.security.authentication.UserMgtException.Reason;
/**
* Validation of names based on a regular expression.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import java.io.Serializable;
import java.util.Set;
import javax.persistence.Transient;
import javax.persistence.Version;
+import org.wamblee.security.authentication.UserMgtException.Reason;
import org.wamblee.security.encryption.MessageDigester;
-import org.wamblee.usermgt.UserMgtException.Reason;
/**
* Represents a user. The methods for managing the groups of the user have
* package scope. Managing the groups of the user should be done through the
- * {@link org.wamblee.usermgt.UserAdministration} interface.
+ * {@link org.wamblee.security.authentication.UserAdministration} interface.
*/
@Entity
@Table(name = "SEC_USER")
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
/**
* Interface for accessing the currently logged in user.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import org.apache.log4j.Logger;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import java.util.Set;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
-
-import static org.wamblee.usermgt.UserMgtException.Reason.DUPLICATE_GROUP;
-import static org.wamblee.usermgt.UserMgtException.Reason.DUPLICATE_USER;
-import static org.wamblee.usermgt.UserMgtException.Reason.GROUP_STILL_OCCUPIED;
-import static org.wamblee.usermgt.UserMgtException.Reason.TRIVIAL_RENAME;
-import static org.wamblee.usermgt.UserMgtException.Reason.UNKNOWN_GROUP;
-import static org.wamblee.usermgt.UserMgtException.Reason.UNKNOWN_USER;
+package org.wamblee.security.authentication;
+
+import static org.wamblee.security.authentication.UserMgtException.Reason.*;
import java.util.HashSet;
import java.util.Set;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import java.util.EnumMap;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import java.util.Set;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt.jpa;
+package org.wamblee.security.authentication.jpa;
import java.util.List;
import java.util.Set;
import javax.persistence.TypedQuery;
import org.wamblee.persistence.JpaMergeSupport;
-import org.wamblee.usermgt.Group;
-import org.wamblee.usermgt.GroupSet;
+import org.wamblee.security.authentication.Group;
+import org.wamblee.security.authentication.GroupSet;
/**
* Group set backed by the database.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt.jpa;
+package org.wamblee.security.authentication.jpa;
import java.util.List;
import java.util.Set;
import org.wamblee.cache.Cache;
import org.wamblee.persistence.JpaMergeSupport;
+import org.wamblee.security.authentication.AbstractUserSet;
+import org.wamblee.security.authentication.Group;
+import org.wamblee.security.authentication.NameValidator;
+import org.wamblee.security.authentication.User;
import org.wamblee.security.encryption.MessageDigester;
-import org.wamblee.usermgt.AbstractUserSet;
-import org.wamblee.usermgt.Group;
-import org.wamblee.usermgt.NameValidator;
-import org.wamblee.usermgt.User;
/**
* User set backed by the database.
import javax.persistence.Table;
import javax.persistence.Version;
-import org.wamblee.usermgt.User;
+import org.wamblee.security.authentication.User;
/**
* Represents an authorization rule to determine whether an operation is allowed
import javax.persistence.Table;
import javax.persistence.Version;
-import org.wamblee.usermgt.UserAccessor;
+import org.wamblee.security.authentication.UserAccessor;
/**
* Service to determine if access to a certain resource is allowed.
import javax.persistence.Table;
import javax.persistence.Version;
-import org.wamblee.usermgt.User;
+import org.wamblee.security.authentication.User;
/**
* Condition used to match a user against a specified set of users.
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
-import org.wamblee.usermgt.User;
+import org.wamblee.security.authentication.User;
/**
* Matches any user.
*/
package org.wamblee.security.authorization;
-import org.wamblee.usermgt.User;
+import org.wamblee.security.authentication.User;
/**
* Represents an authorization rule to determine whether an operation is allowed
*/
package org.wamblee.security.authorization;
-import org.wamblee.usermgt.UserAccessor;
+import org.wamblee.security.authentication.UserAccessor;
/**
* Service to determine if access to a certain resource is allowed.
import javax.persistence.OrderColumn;
import javax.persistence.Transient;
-import org.wamblee.usermgt.User;
-import org.wamblee.usermgt.UserAccessor;
+import org.wamblee.security.authentication.User;
+import org.wamblee.security.authentication.UserAccessor;
/**
* Default implementation of an authorization service. To determine whether
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
-import org.wamblee.usermgt.User;
+import org.wamblee.security.authentication.User;
/**
import javax.persistence.Transient;
import org.apache.log4j.Logger;
-import org.wamblee.usermgt.User;
+import org.wamblee.security.authentication.User;
/**
* Utility base class for implementation of authentication rules based on the
*/
package org.wamblee.security.authorization;
-import org.wamblee.usermgt.User;
+import org.wamblee.security.authentication.User;
/**
* Condition used to match a user against a specified set of users.
import javax.persistence.NonUniqueResultException;
import org.wamblee.persistence.JpaMergeSupport;
+import org.wamblee.security.authentication.UserAccessor;
import org.wamblee.security.authorization.AbstractAuthorizationService;
import org.wamblee.security.authorization.AbstractAuthorizationRule;
import org.wamblee.security.authorization.AuthorizationRule;
import org.wamblee.security.authorization.AuthorizationService;
import org.wamblee.security.authorization.DefaultAuthorizationService;
import org.wamblee.security.authorization.Operation;
-import org.wamblee.usermgt.UserAccessor;
/**
* Authorization service with persistent storage. This is a wrapper for
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import java.util.Set;
+import org.wamblee.security.authentication.Group;
+import org.wamblee.security.authentication.GroupSet;
+import org.wamblee.security.authentication.InMemoryGroupSet;
+
import junit.framework.TestCase;
/**
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import junit.framework.TestCase;
+import org.wamblee.security.authentication.Group;
+import org.wamblee.security.authentication.GroupSet;
+import org.wamblee.security.authentication.InMemoryGroupSet;
+import org.wamblee.security.authentication.InMemoryUserSet;
+import org.wamblee.security.authentication.RegexpNameValidator;
+import org.wamblee.security.authentication.User;
+import org.wamblee.security.authentication.UserMgtException;
+import org.wamblee.security.authentication.UserSet;
+import org.wamblee.security.authentication.UserMgtException.Reason;
import org.wamblee.security.encryption.Md5HexMessageDigester;
-import org.wamblee.usermgt.UserMgtException.Reason;
import java.sql.SQLException;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
import junit.framework.TestCase;
import org.apache.log4j.Logger;
+import org.wamblee.security.authentication.Group;
+import org.wamblee.security.authentication.GroupSet;
+import org.wamblee.security.authentication.InMemoryGroupSet;
+import org.wamblee.security.authentication.InMemoryUserSet;
+import org.wamblee.security.authentication.RegexpNameValidator;
+import org.wamblee.security.authentication.User;
+import org.wamblee.security.authentication.UserAdministration;
+import org.wamblee.security.authentication.UserAdministrationImpl;
+import org.wamblee.security.authentication.UserMgtException;
+import org.wamblee.security.authentication.UserSet;
+import org.wamblee.security.authentication.UserMgtException.Reason;
import org.wamblee.security.encryption.Md5HexMessageDigester;
-import org.wamblee.usermgt.UserMgtException.Reason;
import java.util.Set;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.wamblee.usermgt;
+package org.wamblee.security.authentication;
+import org.wamblee.security.authentication.Group;
+import org.wamblee.security.authentication.RegexpNameValidator;
+import org.wamblee.security.authentication.User;
+import org.wamblee.security.authentication.UserMgtException;
+import org.wamblee.security.authentication.UserMgtException.Reason;
import org.wamblee.security.encryption.Md5HexMessageDigester;
-import org.wamblee.usermgt.UserMgtException.Reason;
/**
* User management test utilities.
import static org.wamblee.security.authorization.AuthorizationResult.DENIED;
import static org.wamblee.security.authorization.AuthorizationResult.GRANTED;
-import org.wamblee.usermgt.UserAccessor;
+import org.wamblee.security.authentication.UserAccessor;
/**
* Tests the authorization service.
import javax.persistence.Entity;
import javax.persistence.Transient;
-import org.wamblee.usermgt.User;
+import org.wamblee.security.authentication.User;
/**
* Test authorization rule that also counts the number of times the rule
import junit.framework.TestCase;
+import org.wamblee.security.authentication.Group;
+import org.wamblee.security.authentication.InMemoryGroupSet;
+import org.wamblee.security.authentication.InMemoryUserSet;
+import org.wamblee.security.authentication.RegexpNameValidator;
+import org.wamblee.security.authentication.User;
+import org.wamblee.security.authentication.UserAccessor;
+import org.wamblee.security.authentication.UserAdministration;
+import org.wamblee.security.authentication.UserAdministrationImpl;
+import org.wamblee.security.authentication.UserMgtException;
+import org.wamblee.security.authentication.UserMgtException.Reason;
import org.wamblee.security.encryption.Md5HexMessageDigester;
-import org.wamblee.usermgt.Group;
-import org.wamblee.usermgt.InMemoryGroupSet;
-import org.wamblee.usermgt.InMemoryUserSet;
-import org.wamblee.usermgt.RegexpNameValidator;
-import org.wamblee.usermgt.User;
-import org.wamblee.usermgt.UserAccessor;
-import org.wamblee.usermgt.UserAdministration;
-import org.wamblee.usermgt.UserAdministrationImpl;
-import org.wamblee.usermgt.UserMgtException;
-import org.wamblee.usermgt.UserMgtException.Reason;
/**
* User access that always returns a user that belongs to a fixed group.
import static org.wamblee.security.authorization.AuthorizationResult.UNDECIDED;
import static org.wamblee.security.authorization.AuthorizationResult.UNSUPPORTED_RESOURCE;
-import org.wamblee.usermgt.User;
+import org.wamblee.security.authentication.User;
/**
* Tests for the {@link org.wamblee.security.authorization.UrlAuthorizationRule}
<beans>
- <bean id="org.wamblee.usermgt.UserAccessor"
+ <bean id="org.wamblee.security.authentication.UserAccessor"
class="org.wamblee.security.authorization.TestUserAccessor">
</bean>
<beans>
<bean id="usermgtInitializer"
- class="org.wamblee.usermgt.UserAdminInitializer">
- <constructor-arg><ref local="org.wamblee.usermgt.UserAdministration"/></constructor-arg>
+ class="org.wamblee.security.authentication.UserAdminInitializer">
+ <constructor-arg><ref local="org.wamblee.security.authentication.UserAdministration"/></constructor-arg>
<!-- users -->
<constructor-arg>
<list>