Class ReturnAllowedAttributeReleasePolicy

  • All Implemented Interfaces:
    java.io.Serializable, org.apereo.cas.services.RegisteredServiceAttributeReleasePolicy, org.springframework.core.Ordered

    public class ReturnAllowedAttributeReleasePolicy
    extends AbstractRegisteredServiceAttributeReleasePolicy
    Return only the collection of allowed attributes out of what's resolved for the principal.
    Since:
    4.1.0
    See Also:
    Serialized Form
    • Field Summary

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

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> authorizeReleaseOfAllowedAttributes​(org.apereo.cas.authentication.principal.Principal principal, java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attrs, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.Service selectedService)
      Authorize release of allowed attributes map.
      protected java.util.List<java.lang.String> determineRequestedAttributeDefinitions​(org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.Service selectedService)
      This method should be overridden by release policies that are able to request definitions by listing them as being released in the policy.
      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>> attrs, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.Service selectedService)
      Gets the attributes internally from the implementation.
      • 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

      • ReturnAllowedAttributeReleasePolicy

        public ReturnAllowedAttributeReleasePolicy()
    • Method Detail

      • getAttributesInternal

        public 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>> attrs,
                                                                                                            org.apereo.cas.services.RegisteredService registeredService,
                                                                                                            org.apereo.cas.authentication.principal.Service selectedService)
        Description copied from class: AbstractRegisteredServiceAttributeReleasePolicy
        Gets the attributes internally from the implementation.
        Specified by:
        getAttributesInternal in class AbstractRegisteredServiceAttributeReleasePolicy
        Parameters:
        principal - the principal
        attrs - the principal attributes
        registeredService - the service
        selectedService - the selected service
        Returns:
        the attributes allowed for release
      • authorizeReleaseOfAllowedAttributes

        protected java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> authorizeReleaseOfAllowedAttributes​(org.apereo.cas.authentication.principal.Principal principal,
                                                                                                                             java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attrs,
                                                                                                                             org.apereo.cas.services.RegisteredService registeredService,
                                                                                                                             org.apereo.cas.authentication.principal.Service selectedService)
        Authorize release of allowed attributes map.
        Parameters:
        principal - the principal
        attrs - the attributes
        registeredService - the registered service
        selectedService - the selected service
        Returns:
        the map
      • determineRequestedAttributeDefinitions

        protected java.util.List<java.lang.String> determineRequestedAttributeDefinitions​(org.apereo.cas.authentication.principal.Principal principal,
                                                                                          org.apereo.cas.services.RegisteredService registeredService,
                                                                                          org.apereo.cas.authentication.principal.Service selectedService)
        Description copied from class: AbstractRegisteredServiceAttributeReleasePolicy
        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.
        Overrides:
        determineRequestedAttributeDefinitions in class AbstractRegisteredServiceAttributeReleasePolicy
        Parameters:
        principal - the principal
        registeredService - the registered service
        selectedService - the selected service
        Returns:
        - List of requested attribute definitions to be released.