Customizing Password Expiration View to Display Attributes
Ian Bobbitt
ibobbitt at globalnoc.iu.edu
Fri Oct 23 19:12:27 UTC 2020
You can walk from the ProfileRequestContext to AttributeContext and
reference any resolved attributes.
e.g. if you have an attribute named "givenName" you could get the first
value with:
#set ($rpContext =
$profileRequestContext.getSubcontext('net.shibboleth.idp.profile.context.RelyingPartyContext'))
#set ($attrContext =
$rpContext.getSubcontext('net.shibboleth.idp.attribute.context.AttributeContext'))
#set ($givenNames =
$attrContext.getUnfilteredIdPAttributes().get("givenName").getValues())
#set ($givenName = $givenNames.get(0).getValue())
Error checking left as an exercise for the reader.
-- Ian
On 10/23/20 1:44 PM, Etan Weintraub wrote:
>
> Hey everybody-
>
> We are working on deploying the Password Expiration notification
> pieces
> (https://wiki.shibboleth.net/confluence/display/IDP4/ExpiringPasswordInterceptConfiguration)
> and are trying to customize the view at
> views/intercept/expiring-password.vm to include some data from the
> attribute resolver about the user (their name, when their password
> expires, etc.). I can’t seem to find how to pull that information in
> the view. Can anyone point me in the right direction?
>
> Thanks!
>
> -Etan E. Weintraub
>
> IT Architect
>
> Enterprise Authentication & Cloud Workspace
>
> IT at Johns Hopkins
>
> Johns Hopkins at Mt. Washington
>
> 5801 Smith Ave. <x-apple-data-detectors://4/>
>
> Davis Building Suite <x-apple-data-detectors://4/> 3110B
>
> Baltimore, MD 21209 <x-apple-data-detectors://5/0>
>
> E-mail: eweintra at jhmi.edu <mailto:eweintra at jhmi.edu>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20201023/c5ce9935/attachment.htm>
More information about the users
mailing list