Versions Compared

Key

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

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

Overview

The <QueryTemplate> element provides the Velocity 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.

...

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

The legacy V2SAMLProfileRequestContext, provided for compatibility with most legacy SQL query templates.
NameWhen ValidDescription

resolutionContext

always

The AttributeResolutionContext. Commonly useful members properties include $resolutionContext.principal and $resolutionContext.attributeRecipientID

requestContext

If the springResource attribute is not defined on the containing <DataConnector>

foo, bar, etc.

Whenever the enclosing element has a dependency on a named attribute definition or attribute from a data connector


For each IdPAttribute available from all the

provided

input dependencies, the attributes' values are available as a collection under the attribute's name. For the first value

, append

of an attribute with the ID "foo", foo.get(0) will provide it.

Note this this is a simplification of the actual native data structures to simplify the

attribute name

template.

Example

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