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
      protected java.util.List<java.lang.String> determineRequestedAttributeDefinitions​(org.apereo.cas.services.RegisteredServiceAttributeReleasePolicyContext context)
      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>> getAttributes​(org.apereo.cas.services.RegisteredServiceAttributeReleasePolicyContext context)  
      abstract java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getAttributesInternal​(org.apereo.cas.services.RegisteredServiceAttributeReleasePolicyContext context, java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes)
      Gets the attributes internally from the implementation.
      java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getConsentableAttributes​(org.apereo.cas.services.RegisteredServiceAttributeReleasePolicyContext context)  
      protected java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getReleasedByDefaultAttributes​(org.apereo.cas.authentication.principal.Principal principal, 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 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.services.RegisteredServiceAttributeReleasePolicyContext context, java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> principalAttributes)
      Resolve attributes from attribute definition store and provide map.
      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.
      protected boolean supports​(org.apereo.cas.services.RegisteredServiceAttributeReleasePolicyContext context)
      Supports this policy request..
      • 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.services.RegisteredServiceAttributeReleasePolicyContext context)
        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.services.RegisteredServiceAttributeReleasePolicyContext context)
        Specified by:
        getConsentableAttributes in interface org.apereo.cas.services.RegisteredServiceAttributeReleasePolicy
      • getAttributesInternal

        public abstract java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getAttributesInternal​(org.apereo.cas.services.RegisteredServiceAttributeReleasePolicyContext context,
                                                                                                                     java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes)
        Gets the attributes internally from the implementation.
        Parameters:
        context - the context
        attributes - the principal attributes
        Returns:
        the attributes allowed for release
      • supports

        protected boolean supports​(org.apereo.cas.services.RegisteredServiceAttributeReleasePolicyContext context)
        Supports this policy request..
        Parameters:
        context - the context
        Returns:
        the boolean
      • resolveAttributesFromAttributeDefinitionStore

        protected java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> resolveAttributesFromAttributeDefinitionStore​(org.apereo.cas.services.RegisteredServiceAttributeReleasePolicyContext context,
                                                                                                                                       java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> principalAttributes)
        Resolve attributes from attribute definition store and provide map.
        Parameters:
        context - the context
        principalAttributes - the principal attributes
        Returns:
        the map
      • 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 principal,
                                                                                                                        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:
        principal - the principal
        attributes - the attributes
        Returns:
        the released by default attributes
      • determineRequestedAttributeDefinitions

        protected java.util.List<java.lang.String> determineRequestedAttributeDefinitions​(org.apereo.cas.services.RegisteredServiceAttributeReleasePolicyContext context)
        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.
        Parameters:
        context - the context
        Returns:
        - List of requested attribute definitions to be released.