Class InMemoryUserAndRoleProvider
java.lang.Object
org.opencastproject.userdirectory.InMemoryUserAndRoleProvider
- All Implemented Interfaces:
org.opencastproject.security.api.RoleProvider,org.opencastproject.security.api.UserProvider,org.osgi.service.cm.ManagedService
public class InMemoryUserAndRoleProvider
extends Object
implements org.opencastproject.security.api.UserProvider, org.opencastproject.security.api.RoleProvider, org.osgi.service.cm.ManagedService
An in-memory user directory containing the users and roles used by the system.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConfiguration key for optional additional roles for the capture agent userstatic final Stringstatic final Stringstatic final StringConfiguration key for the digest passwordstatic final StringConfiguration key for the digest usersstatic final StringThe digest usersstatic final Stringprotected org.opencastproject.security.api.SecurityServiceThe security serviceFields inherited from interface org.opencastproject.security.api.UserProvider
ALL_ORGANIZATIONS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactivate(org.osgi.service.component.ComponentContext cc) Callback to activate the component.longIterator<org.opencastproject.security.api.Role> Iterator<org.opencastproject.security.api.User> getName()List<org.opencastproject.security.api.Role> getRolesForUser(String userName) Iterator<org.opencastproject.security.api.User> getUsers()voidinvalidate(String userName) org.opencastproject.security.api.UsertoString()voidupdated(Dictionary<String, ?> properties) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opencastproject.security.api.UserProvider
findUsers
-
Field Details
-
PROVIDER_NAME
- See Also:
-
DIGEST_USER_NAME
The digest users- See Also:
-
CAPTURE_AGENT_USER_NAME
- See Also:
-
DIGEST_USER_KEY
Configuration key for the digest users- See Also:
-
CAPTURE_AGENT_USER_PREFIX
- See Also:
-
DIGEST_PASSWORD_KEY
Configuration key for the digest password- See Also:
-
CAPTURE_AGENT_ROLES_PREFIX
Configuration key for optional additional roles for the capture agent user- See Also:
-
securityService
protected org.opencastproject.security.api.SecurityService securityServiceThe security service
-
-
Constructor Details
-
InMemoryUserAndRoleProvider
public InMemoryUserAndRoleProvider()
-
-
Method Details
-
activate
protected void activate(org.osgi.service.component.ComponentContext cc) Callback to activate the component.- Parameters:
cc- the declarative services component context
-
updated
public void updated(Dictionary<String, ?> properties) throws org.osgi.service.cm.ConfigurationException- Specified by:
updatedin interfaceorg.osgi.service.cm.ManagedService- Throws:
org.osgi.service.cm.ConfigurationException
-
getName
- Specified by:
getNamein interfaceorg.opencastproject.security.api.UserProvider
-
getUsers
- Specified by:
getUsersin interfaceorg.opencastproject.security.api.UserProvider
-
loadUser
- Specified by:
loadUserin interfaceorg.opencastproject.security.api.UserProvider- See Also:
-
toString
-
getOrganization
- Specified by:
getOrganizationin interfaceorg.opencastproject.security.api.RoleProvider- Specified by:
getOrganizationin interfaceorg.opencastproject.security.api.UserProvider- See Also:
-
getRolesForUser
- Specified by:
getRolesForUserin interfaceorg.opencastproject.security.api.RoleProvider- See Also:
-
findUsers
public Iterator<org.opencastproject.security.api.User> findUsers(String query, int offset, int limit) - Specified by:
findUsersin interfaceorg.opencastproject.security.api.UserProvider
-
findRoles
public Iterator<org.opencastproject.security.api.Role> findRoles(String query, org.opencastproject.security.api.Role.Target target, int offset, int limit) - Specified by:
findRolesin interfaceorg.opencastproject.security.api.RoleProvider
-
countUsers
public long countUsers()- Specified by:
countUsersin interfaceorg.opencastproject.security.api.UserProvider
-
invalidate
- Specified by:
invalidatein interfaceorg.opencastproject.security.api.UserProvider
-