Package org.opencastproject.security.aai
Class ConfigurableLoginHandler
java.lang.Object
org.opencastproject.security.aai.ConfigurableLoginHandler
- All Implemented Interfaces:
RoleProvider,ShibbolethLoginHandler,org.osgi.service.cm.ManagedService
public class ConfigurableLoginHandler
extends Object
implements ShibbolethLoginHandler, RoleProvider, org.osgi.service.cm.ManagedService
This configurable implementation of the ShibbolethLoginHandler uses the UserReferenceProvider interface to create
and update Opencast reference users provided and authenticated by an external identity provider.
Note that this configurable implementation aims at requiring the minimum number of Shibboleth attributes
to make Opencast work with most Shibboleth-based Authentication and Authorization Infrastractures (AAI).
-
Field Summary
Fields inherited from interface org.opencastproject.security.shibboleth.ShibbolethLoginHandler
MECH_SHIBBOLETH -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConfigurableLoginHandler(org.osgi.framework.BundleContext bundleContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidexistingUserLogin(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.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.voidsetSecurityService(SecurityService securityService) Sets the security service.voidsetUserReferenceProvider(UserReferenceProvider userReferenceProvider) Sets the user reference provider.voidupdated(Dictionary properties)
-
Constructor Details
-
ConfigurableLoginHandler
public ConfigurableLoginHandler() -
ConfigurableLoginHandler
protected ConfigurableLoginHandler(org.osgi.framework.BundleContext bundleContext)
-
-
Method Details
-
updated
- Specified by:
updatedin interfaceorg.osgi.service.cm.ManagedService- Throws:
org.osgi.service.cm.ConfigurationException
-
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
-
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:
-