Class JWTRoleProvider

java.lang.Object
org.opencastproject.security.jwt.JWTRoleProvider
All Implemented Interfaces:
GroupProvider, RoleProvider, AAIRoleProvider

public class JWTRoleProvider extends Object implements AAIRoleProvider, GroupProvider
Role provider for users authenticated based on JWTs.
  • Constructor Details

  • Method Details

    • getRoles

      public Iterator<Role> getRoles()
      Description copied from interface: AAIRoleProvider
      Return the roles
      Specified by:
      getRoles in interface AAIRoleProvider
      Returns:
      the roles
    • getRolesForUser

      public List<Role> getRolesForUser(String userName)
      Description copied from interface: RoleProvider
      Returns the roles for this user or an empty array if no roles are applicable.
      Specified by:
      getRolesForUser in interface RoleProvider
      Parameters:
      userName - the user id
      Returns:
      the set of roles
    • getOrganization

      public String getOrganization()
      Description copied from interface: RoleProvider
      Returns the identifier for the organization that is defining this set of roles.
      Specified by:
      getOrganization in interface RoleProvider
      Returns:
      the defining organization
    • findRoles

      public Iterator<Role> findRoles(String query, Role.Target target, int offset, int limit)
      Description copied from interface: RoleProvider
      Return the found roles as an iterator.
      Specified by:
      findRoles in interface RoleProvider
      Parameters:
      query - the query. Use the wildcards "_" to match any single character and "%" to match an arbitrary number of characters (including zero characters).
      offset - the offset
      limit - the limit. 0 means no limit
      Returns:
      an iterator of role's
    • getRolesForGroup

      public List<Role> getRolesForGroup(String groupName)
      Description copied from interface: GroupProvider
      Returns the roles for this group or an empty array if no roles are applicable.
      Specified by:
      getRolesForGroup in interface GroupProvider
      Parameters:
      groupName - the group id
      Returns:
      the set of roles