Package org.apereo.cas.services
Class ReturnMappedAttributeReleasePolicy
- java.lang.Object
-
- org.apereo.cas.services.AbstractRegisteredServiceAttributeReleasePolicy
-
- org.apereo.cas.services.ReturnMappedAttributeReleasePolicy
-
- All Implemented Interfaces:
java.io.Serializable
,org.apereo.cas.services.RegisteredServiceAttributeReleasePolicy
,org.springframework.core.Ordered
public class ReturnMappedAttributeReleasePolicy extends AbstractRegisteredServiceAttributeReleasePolicy
Return a collection of allowed attributes for the principal, but additionally, offers the ability to rename attributes on a per-service level.- Since:
- 4.1.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReturnMappedAttributeReleasePolicy(java.util.Map<java.lang.String,java.lang.Object> attributes)
-
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.services.RegisteredServiceAttributeReleasePolicyContext context, java.util.Map<java.lang.String,java.util.List<java.lang.Object>> attributes)
Authorize release of allowed attributes map.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.lang.Object>
getAllowedAttributes()
Gets the allowed attributes.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>> attrs)
Gets the attributes internally from the implementation.-
Methods inherited from class org.apereo.cas.services.AbstractRegisteredServiceAttributeReleasePolicy
getAttributes, getConsentableAttributes, getReleasedByDefaultAttributes, insertPrincipalIdAsAttributeIfNeeded, postLoad, resolveAttributesFromAttributeDefinitionStore, resolveAttributesFromPrincipalAttributeRepository, returnFinalAttributesCollection, supports
-
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
-
-
-
-
Method Detail
-
getAllowedAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAllowedAttributes()
Gets the allowed attributes.- Returns:
- the allowed attributes
-
getAttributesInternal
public 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>> attrs)
Description copied from class:AbstractRegisteredServiceAttributeReleasePolicy
Gets the attributes internally from the implementation.- Specified by:
getAttributesInternal
in classAbstractRegisteredServiceAttributeReleasePolicy
- Parameters:
context
- the contextattrs
- the principal attributes- Returns:
- the attributes allowed for release
-
determineRequestedAttributeDefinitions
public java.util.List<java.lang.String> determineRequestedAttributeDefinitions(org.apereo.cas.services.RegisteredServiceAttributeReleasePolicyContext context)
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 classAbstractRegisteredServiceAttributeReleasePolicy
- Parameters:
context
- the context- Returns:
- - List of requested attribute definitions to be released.
-
authorizeReleaseOfAllowedAttributes
protected java.util.Map<java.lang.String,java.util.List<java.lang.Object>> authorizeReleaseOfAllowedAttributes(org.apereo.cas.services.RegisteredServiceAttributeReleasePolicyContext context, java.util.Map<java.lang.String,java.util.List<java.lang.Object>> attributes)
Authorize release of allowed attributes map. Map each entry in the allowed list into an array first by the original key, value and the original entry itself. Then process the array to populate the map for allowed attributes.- Parameters:
context
- the contextattributes
- the attributes- Returns:
- the map
-
-