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

RpUIContext

The RelyingPartyUIContext renders information about the relying party drawn from its metadata.  This metadata generally allows language sensitive specification and the rpUIContext respects this.  Specifically it searches for the best match against the (ordered list of) supported languages specified by the browser and failing that for the best match against the (ordered list) of fallback languages specified in idp.properties as idp.ui.fallbackLanguages

In most cases the values are extracted from the Metadata of the relyingparty. The SAML Metadata and the SAML Metadata Login and Discover UI Extensions specifications provide the required details.

$rpUIContext.contactEmail(type)

This returns the (language specific) URL which is the email address of the contact of the specified type (if it exists in the metadata for the relying party).  The URL scheme is limited to http:, https: and mailto:. Other types will not render but will result in an error message in the log.

Parameter

Only one parameter can be provided, the type of the contact can be one of technical, support, administrative, billing, or other.

Example
#set ($email=$rpUIContext.contactEmail(support)) Contact the websites support team <a href="$encoder.encodeForHTMLAttribute($email)"/>here</a>

Specification

The email field is defined in the SAML Metadata specification.

$rpUIContext.contactGivenName(type),  $rpUIContext.contactSurName(type), 

These return the (language specific) "Given Name" and "Surname" of the contact of the specified type (if it exists in the metadata for the relying party).

Parameter

Only one parameter can be provided, the type of the contact can be one of technical, support, administrative, billing, or other.

Example
#set ($surname=$rpUIContext.contactSurName(billing)) #set ($givenName=$rpUIContext.contactGiven(billing)) #if ($givenName) #set ($name=$givenName $surname) #else #set ($name=$surname) #end #if ($name) Billing Contact name is given as $encoder.encodeForHTML($name) #else No Billing Contact name given. #end

Specification

The given name are surname are defined in the SAML Metadata specification.

$rpUIContext.informationURL

This returns the (language specific) Information URL if it exists in the metadata extensions for the relying party.  The URL scheme is limited to http: and https:.  Other types will not render but will result in an error message in the log.

Example
#set ($infoURL=$rpUIContext.informationURL) #if ($infoURL) Information about this service can be found <a href="$encoder.encodeForHTMLAttribute($infoURL)"/>here</a> #end

Parameters

No parameter should be specified.

Specification

The given name are surname are defined in the SAML Metadata Login and Discover UI Extensions specification.

This returns the "best fit" URL specified for the logo of the relying party (if one exists in the metadata extensions). The URL scheme is limited to http:, https: and data:. Other types will not render but will result in an error message in the log.

Note that the specification allows for a logo to provided with no language associated.  If an logo for an appropriate language exists then this is returned, otherwise the no-language logo is returned (assuming that it fits the size constraints as detailed below).

Parameters

Two forms exist.  The first four parameters are supplied these are (respectively) the minimum width, the minimum height, the maximum width and the maximum height (in pixels) that the logo can be.  

The second form has no parameter and any logo which fits the language constraints is returned.

Example

Specification

The logo is defined in the SAML Metadata Login and Discover UI Extensions specification.

$rpUIContext.organizationDisplayName

This returns the (language specific) OrganizationDisplayName if it exists in the metadata for the relying party.  

Example

Parameters

No parameter should be specified.

Specification

The OrganizationDisplayName is defined in the  SAML Metadata specification

$rpUIContext.organizationName

This returns the (language specific) OrganizationName if it exists in the metadata for the relying party.  

Example

Parameters

No parameter should be specified.

Specification

The OrganizationName is defined in the  SAML Metadata specification

$rpUIContext.organizationURL

This returns the (language specific) OrganizationURL URL if it exists in the metadata for the relying party. The URL scheme is limited to http: and https:.  Other types will not render but will result in an error message in the log.

Example

Parameters

No parameter should be specified.

Specification

The OrganizationURL is defined in the  SAML Metadata specification

$rpUIContext.privacyStatementURL

This returns the (language specific) PrivacyStatementURL URL if it exists in the extensions of the metadata for the relying party. The URL scheme is limited to http: and https:.  Other types will not render but will result in an error message in the log.

Example

Parameters

No parameter should be specified.

Specification

The PrivacyStatementURL is defined in the SAML Metadata Login and Discover UI Extensions specification.

$rpUIContext.serviceDescription

This returns the (language specific) description of the service.

The description is located as follows:

  • For every possible language

    • Search the metadata extensions for the relying party for a matching Description, return this is found

    • Search the AttributeConsumingService for the request (which will be part of the metadata for the relying party) for a matching ServiceDescription, return this if found

  • Otherwise return null



Example

Parameters

No parameter should be specified.

Specification

The Description is defined in the SAML Metadata Login and Discover UI Extensions specification.

The ServiceDescription is defined in the SAML Metadata specification

$rpUIContext.serviceName

This will always return a value.  As for the serviceDescription, the search is compound through both the metadata and the metadata extensions

The Service Name is located as follows:

  • For every possible language

    • Search the metadata extensions for the relying party for a matching DisplayName, return this is found

    • Search the AttributeConsumingService for the request (which will be part of the metadata for the relying party) for a matching ServiceName, return this if found

  • Otherwise return a name derived from the EntityID of the relying party

    • If the EntityID is a URI (which it should be) and has a schema of http: or https: return the hostname from the URI.

    • Otherwise return the entityID in full

For example, absent appropriate metadata https://sp.example.org/shibboleth would return sp.example.org, whilst urn:mace:edu.internet:provider:identity:uni.edu  would be unchanged.

Example

Parameters

No parameter should be specified.

Specification

The DisplayName is defined in the   SAML Metadata Login and Discover UI Extensions specification.

The ServiceName is defined in the  SAML Metadata specification