|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.security.Realm
fr.cnes.sitools.security.authentication.SitoolsRealm
fr.cnes.sitools.security.authentication.SitoolsMemoryRealm
public class SitoolsMemoryRealm
Class for building a Realm with the store of users, groups and roles SitoolsMemoryRealm is a fixed and improved version of Restlet MemoryRealm
Constructor Summary | |
---|---|
SitoolsMemoryRealm(UsersAndGroupsStore storeUsersAndGroups,
SitoolsStore<Role> storeRoles,
SitoolsSettings settings)
Constructor |
Method Summary | |
---|---|
java.util.Set<org.restlet.security.Group> |
findGroups(org.restlet.security.User user)
Finds the set of groups where a given user is a member. |
org.restlet.security.User |
findUser(java.lang.String userIdentifier)
Finds a user in the organization based on its identifier. |
java.util.List<org.restlet.security.Group> |
getRootGroups()
Returns the modifiable list of root groups. |
java.util.List<org.restlet.security.User> |
getUsers()
Returns the modifiable list of users. |
boolean |
onVerify(boolean result,
User user)
Verifiers can call this event after the verification is done |
void |
refreshRoleMappings(Role roleStore)
Reload Role from store and rebuild all mappings for groups and users. |
void |
refreshUsersAndGroups()
Refresh users / groups |
void |
removeGroup(java.lang.String groupName)
Remove Group from realm |
void |
removeUser(java.lang.String userIdentifier)
Remove User from realm |
void |
setRootGroups(java.util.List<org.restlet.security.Group> rootGroups)
Sets the modifiable list of root groups. |
void |
setUsers(java.util.List<org.restlet.security.User> users)
Sets the modifiable list of users. |
Methods inherited from class fr.cnes.sitools.security.authentication.SitoolsRealm |
---|
findRoles, findRoles, findRoles, getPublicRole, getReferenceRoles, getSettings, getStoreRoles, removeRole |
Methods inherited from class org.restlet.security.Realm |
---|
getEnroler, getName, getParameters, getVerifier, isStarted, isStopped, setEnroler, setName, setParameters, setVerifier, start, stop, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SitoolsMemoryRealm(UsersAndGroupsStore storeUsersAndGroups, SitoolsStore<Role> storeRoles, SitoolsSettings settings)
storeUsersAndGroups
- storage of users and groupsstoreRoles
- storage of rolessettings
- the SitoolsSettings object where to find realm name, ...Method Detail |
---|
public java.util.Set<org.restlet.security.Group> findGroups(org.restlet.security.User user)
findGroups
in class SitoolsRealm
user
- The member user.
public org.restlet.security.User findUser(java.lang.String userIdentifier)
findUser
in class SitoolsRealm
userIdentifier
- The identifier to match.
public java.util.List<org.restlet.security.Group> getRootGroups()
public void setRootGroups(java.util.List<org.restlet.security.Group> rootGroups)
rootGroups
- A list of root groups.public java.util.List<org.restlet.security.User> getUsers()
public void setUsers(java.util.List<org.restlet.security.User> users)
users
- A list of users.public void refreshUsersAndGroups()
refreshUsersAndGroups
in class SitoolsRealm
public void removeUser(java.lang.String userIdentifier)
removeUser
in class SitoolsRealm
userIdentifier
- Group identifierpublic void removeGroup(java.lang.String groupName)
removeGroup
in class SitoolsRealm
groupName
- Group namepublic void refreshRoleMappings(Role roleStore)
refreshRoleMappings
in class SitoolsRealm
roleStore
- fr.cnes.sitools.role.model.Rolepublic boolean onVerify(boolean result, User user)
SitoolsRealm
onVerify
in class SitoolsRealm
result
- the resultuser
- the user
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |