Package org.opencastproject.security.aai
Class DynamicLoginHandler
java.lang.Object
org.opencastproject.security.aai.DynamicLoginHandler
- All Implemented Interfaces:
GroupProvider,RoleProvider,ShibbolethLoginHandler,AAIRoleProvider,org.springframework.beans.factory.InitializingBean
public class DynamicLoginHandler
extends Object
implements ShibbolethLoginHandler, AAIRoleProvider, GroupProvider, org.springframework.beans.factory.InitializingBean
Dynamic login with Shibboleth data through SpEL mappings
-
Field Summary
Fields inherited from interface org.opencastproject.security.shibboleth.ShibbolethLoginHandler
MECH_SHIBBOLETH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidexistingUserLogin(String id, javax.servlet.http.HttpServletRequest request) Handle an existing user login.findRoles(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.voidnewUserLogin(String id, javax.servlet.http.HttpServletRequest request) Handle a new user login.voidsetAttributeMapper(AttributeMapper attributeMapper) voidsetSecurityService(SecurityService securityService) Sets the security service.voidsetUserReferenceProvider(UserReferenceProvider userReferenceProvider) Sets the user reference provider.
-
Constructor Details
-
DynamicLoginHandler
public DynamicLoginHandler()
-
-
Method Details
-
newUserLogin
Handle a new user login.- Specified by:
newUserLoginin interfaceShibbolethLoginHandler- Parameters:
id- The identity of the user, ideally the Shibboleth persistent unique identifierrequest- The request, for accessing any other Shibboleth variables
-
existingUserLogin
Handle an existing user login.- Specified by:
existingUserLoginin interfaceShibbolethLoginHandler- Parameters:
id- The identity of the user, ideally the Shibboleth persistent unique identifierrequest- The request, for accessing any other Shibboleth variables
-
setSecurityService
Sets the security service.- Parameters:
securityService- the security service
-
setUserReferenceProvider
Sets the user reference provider.- Parameters:
userReferenceProvider- the user reference provider
-
getRoles
Return the roles- Specified by:
getRolesin interfaceAAIRoleProvider- Returns:
- the roles
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getAttributeMapper
-
setAttributeMapper
-
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
-