Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The <QueryTemplate> element provides the template from which the SQL query is built.

Schema Name and Location

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

Example

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

Code Block
languagexml
<QueryTemplate>
  <![CDATA[
         SELECT * FROM people WHERE userid='$resolutionContext.principal'
  ]]>
</QueryTemplate>

Reference

Attributes

No attributes are defined.

...

No child elements are defined.

Template Context

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

NameWhen ValidDescription

resolutionContext

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

requestContext

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

foo, bar, etc.

Whenever the enclosing element has a <Dependency> elementFor each IdPAttribute available from all the provided dependencies, the attributes' values are available
via
as a collection under the attribute's name.