|
||||||||||
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
public abstract class SitoolsRealm
SitoolsRealm based on a memory Role management
Constructor Summary | |
---|---|
SitoolsRealm(SitoolsStore<Role> storeRoles,
SitoolsSettings settings)
Constructor |
Method Summary | |
---|---|
abstract java.util.Set<org.restlet.security.Group> |
findGroups(org.restlet.security.User user)
Find the List of Group containing the given User |
java.util.Set<org.restlet.security.Role> |
findRoles(org.restlet.security.Group userGroup)
Finds the roles mapped to given user group. |
java.util.Set<org.restlet.security.Role> |
findRoles(java.util.Set<org.restlet.security.Group> userGroups)
Finds the roles mapped to given user groups. |
java.util.Set<org.restlet.security.Role> |
findRoles(org.restlet.security.User user)
Finds the roles mapped to a given user. |
abstract org.restlet.security.User |
findUser(java.lang.String userIdentifier)
Find a user from its identifier |
org.restlet.security.Role |
getPublicRole()
Public Role |
java.util.concurrent.ConcurrentHashMap<java.lang.String,org.restlet.security.Role> |
getReferenceRoles()
Get the role map |
SitoolsSettings |
getSettings()
Gets the settings. |
SitoolsStore<Role> |
getStoreRoles()
Gets the role store |
abstract 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. |
abstract void |
refreshUsersAndGroups()
Refresh users and group in the Realm when a user or group is created or deleted mappings need to be refreshed |
abstract void |
removeGroup(java.lang.String groupName)
Remove a Group from the Realm when a group is removed role mappings need to be refreshed |
void |
removeRole(java.lang.String roleName)
Remove Role from realm |
abstract void |
removeUser(java.lang.String userIdentifier)
Remove a user from the Realm when a user is removed role mappings need to be refreshed |
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 SitoolsRealm(SitoolsStore<Role> storeRoles, SitoolsSettings settings)
storeRoles
- the store of Rolesettings
- the SitoolsSettings
Method Detail |
---|
public SitoolsStore<Role> getStoreRoles()
public java.util.concurrent.ConcurrentHashMap<java.lang.String,org.restlet.security.Role> getReferenceRoles()
public org.restlet.security.Role getPublicRole()
public void removeRole(java.lang.String roleName)
roleName
- Role identifierpublic void refreshRoleMappings(Role roleStore)
roleStore
- fr.cnes.sitools.role.model.Rolepublic java.util.Set<org.restlet.security.Role> findRoles(java.util.Set<org.restlet.security.Group> userGroups)
userGroups
- The user groups.
public java.util.Set<org.restlet.security.Role> findRoles(org.restlet.security.User user)
user
- The user.
public java.util.Set<org.restlet.security.Role> findRoles(org.restlet.security.Group userGroup)
userGroup
- The user group.
public abstract org.restlet.security.User findUser(java.lang.String userIdentifier)
userIdentifier
- the user identifier
User
public abstract java.util.Set<org.restlet.security.Group> findGroups(org.restlet.security.User user)
Group
containing the given User
user
- the User
Group
containing the given User
public abstract void removeUser(java.lang.String userIdentifier)
when a user is removed role mappings need to be refreshed
userIdentifier
- the user identifierpublic abstract void removeGroup(java.lang.String groupName)
when a group is removed role mappings need to be refreshed
groupName
- the Name of the grouppublic abstract void refreshUsersAndGroups()
when a user or group is created or deleted mappings need to be refreshed
public abstract boolean onVerify(boolean result, User user)
result
- the resultuser
- the user
public SitoolsSettings getSettings()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |