The Shibboleth IdP V4 software will leave support on September 1, 2024.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Namespace: urn:mace:shibboleth:2.0:resolver
Schema: http://shibboleth.net/schema/idp/shibboleth-attribute-resolver.xsd

The <QueryTemplate> element provides the template from which the SQL query is built. It carries no attributes or child elements.

Typically the XML "CDATA" construct is used to wrap the text because it avoids the need for special escaping of most characters.

Template Context

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

NameWhen ValidDescription

resolutionContext

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

requestContext

If the springResource attribute is not defined on the containing <DataConnector>The legacy V2SAMLProfileRequestContext, provided for compatibility with most legacy SQL query templates.

foo, bar, etc.

Whenever the enclosing element has a dependency on a named attribute definition or attribute from a data connectorFor each IdPAttribute available from all the provided dependencies, the attributes' values are available as a collection under the attribute's name. For the first value, append .get(0) to the attribute name.

Example

<QueryTemplate>
  <![CDATA[
         SELECT * FROM people WHERE userid='$resolutionContext.principal'
  ]]>
</QueryTemplate>
  • No labels