Detect password expiry via WebAPI

Hi All

Which WebAPI end-point can one use to check when a users password is set to expire?

Regards

···

Farai Mutero

Hi Farai,

You can use the /api/users endpoint to get information about password expiry.

The expiry is based on time after last password change, and not set to a certain date of expiry, so when you use this endpoint you only get the last time the password was updated, so you need to calculate yourself when the password actually expires.

The following query will return the property you want for a given user:

?fields=userCredentials[passwordLastUpdated]

···

On Tue, Jul 18, 2017 at 11:48 AM, Farai Mutero fmutero@gmail.com wrote:

Hi All

Which WebAPI end-point can one use to check when a users password is set to expire?

Farai Mutero

Regards


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Stian Sandvold
Software developer, DHIS2

University of Oslo

http://www.dhis2.org

Hi Stian

Thank you very much, it works!!

Regards

Farai

···

On Tue, Jul 18, 2017 at 11:56 AM, Stian Sandvold stian@dhis2.org wrote:

Hi Farai,

You can use the /api/users endpoint to get information about password expiry.

The expiry is based on time after last password change, and not set to a certain date of expiry, so when you use this endpoint you only get the last time the password was updated, so you need to calculate yourself when the password actually expires.

The following query will return the property you want for a given user:

?fields=userCredentials[passwordLastUpdated]

On Tue, Jul 18, 2017 at 11:48 AM, Farai Mutero fmutero@gmail.com wrote:

Hi All

Which WebAPI end-point can one use to check when a users password is set to expire?

Farai Mutero

Regards


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Stian Sandvold
Software developer, DHIS2

University of Oslo

http://www.dhis2.org

Farai Mutero