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
  • Constructor Details

    • DynamicLoginHandler

      public DynamicLoginHandler()
  • Method Details

    • newUserLogin

      public void newUserLogin(String id, javax.servlet.http.HttpServletRequest request)
      Handle a new user login.
      Specified by:
      newUserLogin in interface ShibbolethLoginHandler
      Parameters:
      id - The identity of the user, ideally the Shibboleth persistent unique identifier
      request - The request, for accessing any other Shibboleth variables
    • existingUserLogin

      public void existingUserLogin(String id, javax.servlet.http.HttpServletRequest request)
      Handle an existing user login.
      Specified by:
      existingUserLogin in interface ShibbolethLoginHandler
      Parameters:
      id - The identity of the user, ideally the Shibboleth persistent unique identifier
      request - The request, for accessing any other Shibboleth variables
    • setSecurityService

      public void setSecurityService(SecurityService securityService)
      Sets the security service.
      Parameters:
      securityService - the security service
    • setUserReferenceProvider

      public void setUserReferenceProvider(UserReferenceProvider userReferenceProvider)
      Sets the user reference provider.
      Parameters:
      userReferenceProvider - the user reference provider
    • getRoles

      public Iterator<Role> getRoles()
      Return the roles
      Specified by:
      getRoles in interface AAIRoleProvider
      Returns:
      the roles
      See Also:
    • 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
      See Also:
    • 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
      See Also:
    • 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
      See Also:
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • getAttributeMapper

      public AttributeMapper getAttributeMapper()
    • setAttributeMapper

      public void setAttributeMapper(AttributeMapper attributeMapper)
    • 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