public interface UserStore
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTH_USER_ID
ID of a pseudo user which stores the global permissions available to anyone logged in
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPermision(String id,
String permission)
Record a new permission for this user.
|
List<UserPermission> |
authorizedOn(String target)
Return the set of users who have some explicit permission over the given path
Only relevant in applications that use action:path structure.
|
org.apache.shiro.authc.SaltedAuthenticationInfo |
checkUser(String id)
Test if a user is registered.
|
String |
createCredentials(String id,
int minstolive)
Create a new random password, set it and return it.
|
Set<String> |
getPermissions(String id)
Return all the permissions and rolefor this user
|
UserInfo |
getUser(String id)
Return the user info for the given user ID, or null if not found
|
List<UserInfo> |
listUsers(String match)
Return the set of users whose name includes the given string
|
boolean |
register(UserInfo user)
Register a new user.
|
void |
removeCredentials(String id)
Remove the credentials for the user
|
void |
removePermission(String id,
String permission)
Remove the specific matching permission for this user
|
void |
removePermissionsOn(String id,
String target)
Remove permissions from this user for the given path.
|
void |
setCredentials(String id,
org.apache.shiro.util.ByteSource credentials,
int minstolive)
Store new credentials for the user
|
void |
setRealm(AppRealm realm)
Link this store to a specific authorization realm
|
void |
unregister(String id)
Unregister a user, removing them and any permissions from the store
|
static final String AUTH_USER_ID
void setRealm(AppRealm realm)
boolean register(UserInfo user)
org.apache.shiro.authc.SaltedAuthenticationInfo checkUser(String id)
id - the openid identifier string authenticated by the uservoid unregister(String id)
void setCredentials(String id, org.apache.shiro.util.ByteSource credentials, int minstolive)
id - the openid identifier string authenticated by the usercredentials - the password to storeminstolive - the time-to-livefor the credentials in minutesString createCredentials(String id, int minstolive)
Yes, the return ought to be a char[] to allow for reseting but the use case will be creating string serializations of the key in any case to send it out so the added security of using char[] is zero.
void removeCredentials(String id)
Set<String> getPermissions(String id)
void removePermission(String id, String permission)
void removePermissionsOn(String id, String target)
List<UserPermission> authorizedOn(String target)
List<UserInfo> listUsers(String match)
Copyright © 2015. All rights reserved.