0
我正在查找API以查找特定应用程序的用户上次登录日期。不知道它是否存在,请让我知道您对通过API调用获取此信息的想法。上次登录要申请的日期
我正在查找API以查找特定应用程序的用户上次登录日期。不知道它是否存在,请让我知道您对通过API调用获取此信息的想法。上次登录要申请的日期
你可以得到的最后日期,用户被认证为任何应用上User profile:
GET https://dev-12345.oktapreview.com/api/v1/users/xyz
{
"id": "xyz",
"status": "ACTIVE",
"created": "2017-02-22T02:33:02.000Z",
"activated": null,
"statusChanged": "2017-02-22T17:50:43.000Z",
"lastLogin": "2017-09-28T16:19:57.000Z",
"lastUpdated": "2017-08-08T20:11:46.000Z",
"passwordChanged": "2017-02-22T17:50:43.000Z",
"profile": {
"lastName": "Barbettini",
"firstName": "Nathanael",
// ...
}
的lastLogin
字段包含的用户最后一次登录的时间戳记
这虽然没有在每个应用程序的基础上进行跟踪。你可以得到应用特定App User:
GET https://dev-12345.oktapreview.com/api/v1/apps/abc/users/
{
"created": "2017-09-22T00:54:49.000Z",
"lastUpdated": "2017-09-22T00:54:49.000Z",
"scope": "GROUP",
"status": "ACTIVE",
"statusChanged": "2017-09-22T00:54:49.000Z",
"passwordChanged": null,
"syncState": "DISABLED",
"profile": {
"zoneinfo": "America/Los_Angeles",
"region": null,
// ...
}
但它没有lastLogin
。解决这个问题的一种方法是在应用程序代码中的应用程序用户配置文件中保存一个时间戳。