The Shibboleth IdP V3 software has reached its End of Life and is no longer supported. This documentation is available for historical purposes only. See the IDP4 wiki space for current documentation on the supported version.

CacheKeyTemplate

The <CacheKeyTemplate> element provides the template from which a cache key associated with the result of the connector can be built. This element may be used when the <BodyTemplate> is used to trigger use of POST. Normally caching can be keyed off of the URL of a GET request since it will contain all of the request's variable state, but with POST this isn't possible. This allows the caching to be customized to the specific nature of a request, or disabled dynamically if an empty string is produced.

Schema Name and Location

This element is defined in the urn:mace:shibboleth:2.0:resolver namespace, the schema for which is located at http://shibboleth.net/schema/idp/shibboleth-attribute-resolver.xsd

Example

The example demonstrates construction of a cache key based solely on an attribute unique to the identity of the subject.

<CacheKeyTemplate MIMEType="text/xml">
	<![CDATA[	
	$employeeNumber.get(0)
	]]>
</CacheKeyTemplate>

Configuration Reference

Attributes

No attributes are defined.

Child Elements

No child elements are defined.

Template Context

As enumerated below, several variables are available in the template context. In practice, $resolutionContext.principal and various named dependent attributes (if any) tend to be most useful.

NameTypeDescription

resolutionContext

AttributeResolutionContext

Commonly useful members include $resolutionContext.principal and $resolutionContext.attributeRecipientID

foo, bar, etc.

List<IdPAttributeValue>For each IdPAttribute available from all the provided dependencies, the attributes' values are available as a collection under the attribute's name.
paramEscapercom.google.common.escape.EscaperFor safe embedding of input data into a query parameter
fragmentEscapercom.google.common.escape.EscaperFor safe embedding of input data into a URL fragment
pathEscapercom.google.common.escape.EscaperFor safe embedding of input data into a URL path
xmlAttributeEscapercom.google.common.escape.EscaperFor safe embedding of input data into an XML attribute
xmlContentEscapercom.google.common.escape.EscaperFor safe embedding of input data in XML element content
httpClientSecurityParametersHttpClientSecurityParametersRarely of interest but provides access to security parameters to be used during call