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 Details

    • PROVIDER_NAME

      public static final String PROVIDER_NAME
      See Also:
    • DIGEST_USER_NAME

      public static final String DIGEST_USER_NAME
      The digest users
      See Also:
    • CAPTURE_AGENT_USER_NAME

      public static final String CAPTURE_AGENT_USER_NAME
      See Also:
    • DIGEST_USER_KEY

      public static final String DIGEST_USER_KEY
      Configuration key for the digest users
      See Also:
    • CAPTURE_AGENT_USER_PREFIX

      public static final String CAPTURE_AGENT_USER_PREFIX
      See Also:
    • DIGEST_PASSWORD_KEY

      public static final String DIGEST_PASSWORD_KEY
      Configuration key for the digest password
      See Also:
    • CAPTURE_AGENT_ROLES_PREFIX

      public static final String CAPTURE_AGENT_ROLES_PREFIX
      Configuration key for optional additional roles for the capture agent user
      See Also:
    • securityService

      protected org.opencastproject.security.api.SecurityService securityService
      The 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:
      updated in interface org.osgi.service.cm.ManagedService
      Throws:
      org.osgi.service.cm.ConfigurationException
    • getName

      public String getName()
      Specified by:
      getName in interface org.opencastproject.security.api.UserProvider
    • getUsers

      public Iterator<org.opencastproject.security.api.User> getUsers()
      Specified by:
      getUsers in interface org.opencastproject.security.api.UserProvider
    • loadUser

      public org.opencastproject.security.api.User loadUser(String userName)
      Specified by:
      loadUser in interface org.opencastproject.security.api.UserProvider
      See Also:
      • UserProvider.loadUser(java.lang.String)
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • getOrganization

      public String getOrganization()
      Specified by:
      getOrganization in interface org.opencastproject.security.api.RoleProvider
      Specified by:
      getOrganization in interface org.opencastproject.security.api.UserProvider
      See Also:
      • UserProvider.getOrganization()
    • getRolesForUser

      public List<org.opencastproject.security.api.Role> getRolesForUser(String userName)
      Specified by:
      getRolesForUser in interface org.opencastproject.security.api.RoleProvider
      See Also:
      • RoleProvider.getRolesForUser(String)
    • findUsers

      public Iterator<org.opencastproject.security.api.User> findUsers(String query, int offset, int limit)
      Specified by:
      findUsers in interface org.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:
      findRoles in interface org.opencastproject.security.api.RoleProvider
    • countUsers

      public long countUsers()
      Specified by:
      countUsers in interface org.opencastproject.security.api.UserProvider
    • invalidate

      public void invalidate(String userName)
      Specified by:
      invalidate in interface org.opencastproject.security.api.UserProvider