Adding rpUIContext (and later a username) to error.vm
Cameron Kerr
cameron.kerr at otago.ac.nz
Sun Mar 5 16:04:26 EST 2017
> -----Original Message-----
> From: users [mailto:users-bounces at shibboleth.net] On Behalf Of Cantor,
> Scott
> Sent: Tuesday, 28 February 2017 3:34 AM
> To: Shib Users <users at shibboleth.net>
> Subject: RE: Adding rpUIContext (and later a username) to error.vm
> Every flow has different conventions for where things show up, it's
> situational, and largely undocumented. The UI context is underneath the
> AuthenticationContext in the SSO flows (PRC -> AuthenticationContext
> ->RelyingPartyUIContext), so you're just looking in the wrong place.
Thanks, Scott. Any pointers as how to chase down this information myself? I looked at the Javadocs, but given your comment about it being specific to a flow, I'm guessing that will lead me astray, and I sbould be looking at the various -flow files?
What I _think_ you're saying is that I should have:
#set ($rpContext = $profileRequestContext.getSubcontext("net.shibboleth.idp.profile.context.RelyingPartyContext"))
#set ($authnContext = $profileRequestContext.getSubcontext("net.shibboleth.idp.authn.context.AuthenticationContext"))
#set ($rpUIContext = $authnContext.getSubcontext("net.shibboleth.idp.ui.context.RelyingPartyUIContext"))
Which is a partial improvement. With this (remembering I'm working in error.vm from a Context Check Intercept), I observe the following when encoded for HTML:
* $rpContext.toString() has useful output
* $authnContext.toString() has useful output --- although I'm struggling to isolate just the username -- I did look for a UsernameContext to no avail.
* $rpUIContext doesn't interpolate to anything
Also relevant (and sorry, I forgot to include this before), this is IdP 3.2.1
> > Grepping further, I’m thinking that I’m on the right path, but
> > wondering if I need to add something to my –flow.xml file, like what I
> > see in the terms-of- use context-check.
>
> No.
Thanks for the clarification. Is this because the user has already been through those flows that my -flow file doesn't need to do the likes of SetRPUIInformation, such as is done in terms-of-use?
Cheers,
Cameron
More information about the users
mailing list