Versions Compared

Key

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

...

In addition the Spring framework provides the deployer with the option to use macros. This is described here. Probably the most useful macro is #springMessageText(token,'default value'), which looks up the appropriate (language specific) message property (in overrideable via files in the messages directory) and returns that value or the default.

...

Variables Available in All Templates

Property

Description

encoder

An HTMLEncoder

object (javadoc here). This

, allows safe HTML encoding of various types. This is further described

here

under HtmlEncoder.

profileRequestContext

A ProfileRequestContext

(javadoc here). This is

, primarily used to locate subsidiary contexts:
#set ($rpContext = $profileRequestContext.getSubcontext('net.shibboleth.idp.profile.context.RelyingPartyContext'))
This is an advanced topic and out of scope for this page.

environment

The Spring Environment (javadoc here). This will be most frequently used to resolve properties (defined in idp.properties or other files), by calling the getProperty method. For instance
environment.getProperty("idp.whatever","default")

custom

The Spring bean

with id "

named shibboleth.CustomViewContext

"

. This can be whatever you define it to be (in global.xml). That bean and its content should be treated as immutable.

request

The HttpServletRequest (javadoc here). This is an advanced topic and out of scope for this page.

response

The HttpServletResponse (javadoc here). This is an advanced topic and out of scope for this page.

flowRequestContext

The Spring Web Flow RequestContext (javadoc here). This is an advanced topic and out of scope for this page.

flowExecutionUrl

The URL to redirect to in order to advance the flow (you’ll see this in form actions, typically)

springMacroRequestContext

A help context supplied by Spring. Primarily used to render language specific resources from the message bundles. For instance
$springMacroRequestContext.getMessage("idp.message", "An unidentified error occurred."))

Variables Available to Password Login View

During password login, the templates login.vm and login-error.vm are used and have access to additional variables:

Property

Description

rpUIContext

A RelyingPartyUIContext object. This object allows language sensitive rendering of specific information about the relying party (logos and so forth). This is described further here.

authenticationContext

An AuthenticationContext object. This object contains a large amount of information about the state of the authentication process.

authenticationErrorContext

An AuthenticationErrorContext object. When present (which is only after a previous login error), this provides more detailed information on the failure which can then be displayed. The default views/login-error.vm file demonstrates how the contents of this context can be used to drive language specific message lookup (as in messages/authn-messages.properties).

authenticationWarningContext

An AuthenticationWarningContext object. This isn't typically used within this view, but if warnings about account state are detected at the same time an error is also detected, it may be available.

ldapResponseContext

An LDAPResponseContext object. This isn't typically used within this view, but if warnings about account state are detected at the same time an error is also detected, it may be available.

extendedAuthenticationFlows

Collection of AuthenticationFlowDescriptor objects configured as "extended" flows callable by the login form.

Variables Available During Attribute Release Consent

Property

Description

rpUIContext

RelyingPartyUIContext object. This object allows language sensitive rendering of specific information about the relying party (logos and so forth). This is described further here.

attributeDisplayNameFunction

A

class (javadoc here) with one method 'apply'. This

Function takes an IdPAttribute (usually from $attributeReleaseContext.getConsentableAttributes().values()) and outputs the DisplayName appropriate to the browser locales.

attributeDisplayDescriptionFunction

A

class (javadoc here) with one method 'apply'. This

Function that takes an IdPAttribute (usually from $attributeReleaseContext.getConsentableAttributes().values()) and outputs the DisplayDescription appropriate to the browser locales.

consentContext

A ConsentContext

(javadoc here). A context

representing the state of a consent flow (current and previous consents). Further information TBD.

attributeReleaseContext

An AttributeReleaseContext

(javadoc here). This

, this can be used to provide an iterable group of those attributes to which consent can be applied via the call $attributeReleaseContext.getConsentableAttributes().values().
Specific attributes can be found by direct lookup ($attributeReleaseContext.getConsentableAttributes().get($attributeId)).
In Java terms, $attributeReleaseContext.getConsentableAttributes() is a Map.

Variables Available During Logout

Property

Description

logoutContext

A LogoutContext

(javadoc here). This

, contains information to list the services accessed during the session that has been terminated

multi-rpContext

A MultiRelyingPartyContext

(javadoc here). This

, allows lookup of the RelyingPartyContext

(javadoc here)

for each service listed in the logoutContext

Typically the RelyingPartyContext is further interrogated to get individual rpUIContexts.

...

  • rpUIContext as used in the login case

  • termsOfUseId .  A ConsentContext (javadoc here). A context - a ConsentContext representing the state of a consent flow (current and previous consents). Further information TBD.

...