Display expiration date in expiring password template

Cantor, Scott cantor.2 at osu.edu
Thu Jan 25 17:15:07 EST 2018


On 1/25/18, 11:46 AM, "users on behalf of shibboleth655 at lewenberg.com" <users-bounces at shibboleth.net on behalf of shibboleth655 at lewenberg.com> wrote:

>  I would like to display the value of the "passwordExpiration" in the 
> password expiring view expiring-password.vm. How do I do that?

I imagine there are other ways, but the way I do it is by injecting a JodaTime object as a custom view context bean so I can access it in the view and use it to parse the string that I happen to know is in my expiration attribute so I can turn it into a DateTime and then I can turn that into a formatted string in the view.

My shibboleth.CustomViewContext bean in global.xml is a map and one of the slots is this bean:

    <bean id="osu.passwordExpParser"
        class="org.joda.time.format.DateTimeFormat"
        factory-method="forPattern" c:_0="yyyyMMddHHmmss'Z'" />

It's probably a common enough need that I could add something to the flow/view to do this slightly more conveniently by predefining some of it. Nobody's asked.

-- Scott




More information about the users mailing list