Package org.opencastproject.security.jwt
Class JWTRoleProvider
java.lang.Object
org.opencastproject.security.jwt.JWTRoleProvider
- All Implemented Interfaces:
GroupProvider,RoleProvider,AAIRoleProvider
Role provider for users authenticated based on JWTs.
-
Constructor Summary
ConstructorsConstructorDescriptionJWTRoleProvider(SecurityService securityService, UserReferenceProvider userReferenceProvider) -
Method Summary
Modifier and TypeMethodDescriptionfindRoles(String query, Role.Target target, int offset, int limit) Return the found roles as an iterator.Returns the identifier for the organization that is defining this set of roles.getRoles()Return the rolesgetRolesForGroup(String groupName) Returns the roles for this group or an empty array if no roles are applicable.getRolesForUser(String userName) Returns the roles for this user or an empty array if no roles are applicable.
-
Constructor Details
-
JWTRoleProvider
public JWTRoleProvider(SecurityService securityService, UserReferenceProvider userReferenceProvider)
-
-
Method Details
-
getRoles
Description copied from interface:AAIRoleProviderReturn the roles- Specified by:
getRolesin interfaceAAIRoleProvider- Returns:
- the roles
-
getRolesForUser
Description copied from interface:RoleProviderReturns the roles for this user or an empty array if no roles are applicable.- Specified by:
getRolesForUserin interfaceRoleProvider- Parameters:
userName- the user id- Returns:
- the set of roles
-
getOrganization
Description copied from interface:RoleProviderReturns the identifier for the organization that is defining this set of roles.- Specified by:
getOrganizationin interfaceRoleProvider- Returns:
- the defining organization
-
findRoles
Description copied from interface:RoleProviderReturn the found roles as an iterator.- Specified by:
findRolesin interfaceRoleProvider- 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 offsetlimit- the limit. 0 means no limit- Returns:
- an iterator of role's
-
getRolesForGroup
Description copied from interface:GroupProviderReturns the roles for this group or an empty array if no roles are applicable.- Specified by:
getRolesForGroupin interfaceGroupProvider- Parameters:
groupName- the group id- Returns:
- the set of roles
-