Customizing Password Expiration View to Display Attributes
Etan Weintraub
eweintra at jhmi.edu
Fri Oct 23 19:34:45 UTC 2020
Thank you! That worked perfectly! Exactly what I needed!
-Etan E. Weintraub
IT Architect
Enterprise Authentication & Cloud Workspace
IT at Johns Hopkins
Johns Hopkins at Mt. Washington
<x-apple-data-detectors://4/> 5801 Smith Ave.
Davis Building <x-apple-data-detectors://4/> Suite 3110B
<x-apple-data-detectors://5/0> Baltimore, MD 21209
E-mail: <mailto:eweintra at jhmi.edu> eweintra at jhmi.edu
From: users <users-bounces at shibboleth.net> On Behalf Of Ian Bobbitt
Sent: Friday, October 23, 2020 3:12 PM
To: users at shibboleth.net
Subject: Re: Customizing Password Expiration View to Display Attributes
External Email - Use Caution
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.Rel
yingPartyContext'))
#set ($attrContext =
$rpContext.getSubcontext('net.shibboleth.idp.attribute.context.AttributeCont
ext'))
#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/ExpiringPasswordInterce
ptConfiguration) 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
<x-apple-data-detectors://4/> 5801 Smith Ave.
Davis Building <x-apple-data-detectors://4/> Suite 3110B
<x-apple-data-detectors://5/0> Baltimore, MD 21209
E-mail: <mailto:eweintra at jhmi.edu> eweintra at jhmi.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20201023/2bc9fbe9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6686 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/users/attachments/20201023/2bc9fbe9/attachment.p7s>
More information about the users
mailing list