Class AbstractRegisteredServiceAttributeReleasePolicy

    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getAttributes​(org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.authentication.principal.Service selectedService, org.apereo.cas.services.RegisteredService registeredService)  
      abstract java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getAttributesInternal​(org.apereo.cas.authentication.principal.Principal principal, java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes, org.apereo.cas.services.RegisteredService service, org.apereo.cas.authentication.principal.Service selectedService)
      Gets the attributes internally from the implementation.
      java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getConsentableAttributes​(org.apereo.cas.authentication.principal.Principal p, org.apereo.cas.authentication.principal.Service selectedService, org.apereo.cas.services.RegisteredService service)  
      protected java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getReleasedByDefaultAttributes​(org.apereo.cas.authentication.principal.Principal p, java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes)
      Determines a default bundle of attributes that may be released to all services without the explicit mapping for each service.
      protected java.util.List<java.lang.String> getRequestedDefinitions()
      This method should be overridden by release policies that are able to request definitions by listing them as being released in the policy.
      protected void insertPrincipalIdAsAttributeIfNeeded​(org.apereo.cas.authentication.principal.Principal principal, java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributesToRelease, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.services.RegisteredService registeredService)
      Release principal id as attribute if needed.
      void postLoad()
      Post load, after having loaded the bean via JPA, etc.
      protected java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> resolveAttributesFromAttributeDefinitionStore​(org.apereo.cas.authentication.principal.Principal principal, java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> principalAttributes, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.Service selectedService)  
      protected java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> resolveAttributesFromPrincipalAttributeRepository​(org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.services.RegisteredService registeredService)
      Resolve attributes from principal attribute repository.
      protected java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> returnFinalAttributesCollection​(java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributesToRelease, org.apereo.cas.services.RegisteredService service)
      Return the final attributes collection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apereo.cas.services.RegisteredServiceAttributeReleasePolicy

        getConsentPolicy, getName, getOrder, getPrincipalAttributesRepository, isAuthorizedToReleaseAuthenticationAttributes, isAuthorizedToReleaseCredentialPassword, isAuthorizedToReleaseProxyGrantingTicket, setAttributeFilter
    • Constructor Detail

      • AbstractRegisteredServiceAttributeReleasePolicy

        public AbstractRegisteredServiceAttributeReleasePolicy()
    • Method Detail

      • postLoad

        public void postLoad()
        Post load, after having loaded the bean via JPA, etc.
      • getAttributes

        public java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getAttributes​(org.apereo.cas.authentication.principal.Principal principal,
                                                                                                    org.apereo.cas.authentication.principal.Service selectedService,
                                                                                                    org.apereo.cas.services.RegisteredService registeredService)
        Specified by:
        getAttributes in interface org.apereo.cas.services.RegisteredServiceAttributeReleasePolicy
      • getConsentableAttributes

        public java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getConsentableAttributes​(org.apereo.cas.authentication.principal.Principal p,
                                                                                                               org.apereo.cas.authentication.principal.Service selectedService,
                                                                                                               org.apereo.cas.services.RegisteredService service)
        Specified by:
        getConsentableAttributes in interface org.apereo.cas.services.RegisteredServiceAttributeReleasePolicy
      • resolveAttributesFromAttributeDefinitionStore

        protected java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> resolveAttributesFromAttributeDefinitionStore​(org.apereo.cas.authentication.principal.Principal principal,
                                                                                                                                       java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> principalAttributes,
                                                                                                                                       org.apereo.cas.services.RegisteredService registeredService,
                                                                                                                                       org.apereo.cas.authentication.principal.Service selectedService)
      • resolveAttributesFromPrincipalAttributeRepository

        protected java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> resolveAttributesFromPrincipalAttributeRepository​(org.apereo.cas.authentication.principal.Principal principal,
                                                                                                                                           org.apereo.cas.services.RegisteredService registeredService)
        Resolve attributes from principal attribute repository.
        Parameters:
        principal - the principal
        registeredService - the registered service
        Returns:
        the map
      • insertPrincipalIdAsAttributeIfNeeded

        protected void insertPrincipalIdAsAttributeIfNeeded​(org.apereo.cas.authentication.principal.Principal principal,
                                                            java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributesToRelease,
                                                            org.apereo.cas.authentication.principal.Service service,
                                                            org.apereo.cas.services.RegisteredService registeredService)
        Release principal id as attribute if needed.
        Parameters:
        principal - the principal
        attributesToRelease - the attributes to release
        service - the service
        registeredService - the registered service
      • returnFinalAttributesCollection

        protected java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> returnFinalAttributesCollection​(java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributesToRelease,
                                                                                                                         org.apereo.cas.services.RegisteredService service)
        Return the final attributes collection. Subclasses may override this minute to impose last minute rules.
        Parameters:
        attributesToRelease - the attributes to release
        service - the service
        Returns:
        the map
      • getReleasedByDefaultAttributes

        protected java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getReleasedByDefaultAttributes​(org.apereo.cas.authentication.principal.Principal p,
                                                                                                                        java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes)
        Determines a default bundle of attributes that may be released to all services without the explicit mapping for each service.
        Parameters:
        p - the principal
        attributes - the attributes
        Returns:
        the released by default attributes
      • getRequestedDefinitions

        protected java.util.List<java.lang.String> getRequestedDefinitions()
        This method should be overridden by release policies that are able to request definitions by listing them as being released in the policy. This method should return the list of definitions keys that need to be resolved by the definition store so the can be resolved and released to the client.
        Returns:
        - List of requested definitions to be released.
      • getAttributesInternal

        public abstract java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getAttributesInternal​(org.apereo.cas.authentication.principal.Principal principal,
                                                                                                                     java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes,
                                                                                                                     org.apereo.cas.services.RegisteredService service,
                                                                                                                     org.apereo.cas.authentication.principal.Service selectedService)
        Gets the attributes internally from the implementation.
        Parameters:
        principal - the principal
        attributes - the principal attributes
        service - the service
        selectedService - the selected service
        Returns:
        the attributes allowed for release