]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/UserAdminService.java
2 * Copyright (C) 2007-2012 Mathieu Baudier
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org
.argeo
.security
;
20 import org
.springframework
.security
.userdetails
.UserDetailsManager
;
22 /** Enrich {@link UserDetailsManager} in order to provide roles semantics. */
23 public interface UserAdminService
extends UserDetailsManager
{
25 * Usernames must match this regexp pattern ({@value #USERNAME_PATTERN}).
27 * "http://www.mkyong.com/regular-expressions/how-to-validate-username-with-regular-expression/"
28 * >this tip</a> (modified to add upper-case, add '@')
30 //public final static String USERNAME_PATTERN = "^[a-zA-Z0-9_-@]{3,64}$";
33 * Email addresses must match this regexp pattern ({@value #EMAIL_PATTERN}.
35 * "http://www.mkyong.com/regular-expressions/how-to-validate-email-address-with-regular-expression/"
38 public final static String EMAIL_PATTERN
= "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
43 /** List all users. */
44 public Set
<String
> listUsers();
46 /** List users having this role (except the super user). */
47 public Set
<String
> listUsersInRole(String role
);
49 /** Synchronize with the underlying DAO. */
50 public void synchronize();
55 public void newRole(String role
);
57 public Set
<String
> listEditableRoles();
59 public void deleteRole(String role
);