如何从OKTA API获取注册设备名称

问题描述 投票:0回答:1

我需要像OKTA一样在屏幕上显示OKTA注册设备名称。

enter image description here

在上面的图片中显示((Pixel 2 XL),其中是用于获取注册设备名称的OKTA API

我指的是OKTA dev API,但在任何地方都找不到

https://developer.okta.com/docs/reference/api/factors/

任何想法我在哪里可以找到???

asp.net asp.net-core asp.net-web-api okta okta-api
1个回答
0
投票

一旦有了用户名,您就可以调用the factors list API来获取该用户的注册MFA因子。

这会使您恢复身材:

[
{
    "id": "opffxq5v54xO5kdsa0x6",
    "factorType": "push",
    "provider": "OKTA",
    "vendorName": "OKTA",
    "status": "ACTIVE",
    "created": "2020-05-07T20:49:49.000Z",
    "lastUpdated": "2020-05-20T13:33:58.000Z",
    "profile": {
        "credentialId": "[email protected]",
        "deviceType": "SmartPhone_Android",
        "keys": [
            {
                "kty": "RSA",
                "use": "sig",
                "kid": "default",
                "e": "AQAB",
                "n": "j_rlzlG07lZy_TegQPjllleeaGxxDsrtFNaoQHhDowV1z54okXdDobyJo5B9rcCkP7-i0EniNdaCFDj8xugG7WSmcDRzr46AujT7nFVPI5Z7EZE9IaLdYLP0Hg0nRaC3qhHPdv8JGszle8t0Fej1eR-AqT1mrsNUM3-k44_Axj47xhAkIPoxCjyvvA8W1FWKQbECe_y-HtlcLksJlW03WDt_bCdKwx2uVqca1yiEIF3HwhHtpK1dfwosjyEvfpTtsUWtKJVsJiksLajDhu9dGN3JcOT9unsLbWcyWc-kfQ9_oiaMikZCvtbONGSgVjtBttc95-8CHMw-tpA4HCRlcw"
            }
        ],
        "name": "Pixel 4 XL",
        "platform": "ANDROID",
        "version": "29"
    },
    "_links": {
        "self": {
            "href": "https://<yourtenant>.oktapreview.com/api/v1/users/00u9ivp5ft7EHNTRW0x6/factors/opffxq5v54xO5kdsa0x6",
            "hints": {
                "allow": [
                    "GET",
                    "DELETE"
                ]
            }
        },
        "verify": {
            "href": "https://<yourtenant>.oktapreview.com/api/v1/users/00u9ivp5ft7EHNTRW0x6/factors/opffxq5v54xO5kdsa0x6/verify",
            "hints": {
                "allow": [
                    "POST"
                ]
            }
        },
        "user": {
            "href": "https://<yourtenant>.oktapreview.com/api/v1/users/00u9ivp5ft7EHNTRW0x6",
            "hints": {
                "allow": [
                    "GET"
                ]
            }
        }
    }
},
{
    "id": "ostgppjgvFiLfBv850x6",
    "factorType": "token:software:totp",
    "provider": "OKTA",
    "vendorName": "OKTA",
    "status": "ACTIVE",
    "created": "2020-05-20T13:33:58.000Z",
    "lastUpdated": "2020-05-20T13:33:58.000Z",
    "profile": {
        "credentialId": "[email protected]"
    },
    "_links": {
        "self": {
            "href": "https://<yourtenant>.oktapreview.com/api/v1/users/00u9ivp5ft7EHNTRW0x6/factors/ostgppjgvFiLfBv850x6",
            "hints": {
                "allow": [
                    "GET",
                    "DELETE"
                ]
            }
        },
        "verify": {
            "href": "https://<yourtenant>.oktapreview.com/api/v1/users/00u9ivp5ft7EHNTRW0x6/factors/ostgppjgvFiLfBv850x6/verify",
            "hints": {
                "allow": [
                    "POST"
                ]
            }
        },
        "user": {
            "href": "https://<yourtenant>.oktapreview.com/api/v1/users/00u9ivp5ft7EHNTRW0x6",
            "hints": {
                "allow": [
                    "GET"
                ]
            }
        }
    }
}

]

设备信息显示在factorProfile(profile.name)下,已记录在here中,但未显示推送示例。

© www.soinside.com 2019 - 2024. All rights reserved.