authentication - 通过使用 2FA 的 Okta 进行身份验证
问题描述
我构建了一个简单的 asp.net 核心应用程序,除了用户名和密码之外,还需要对使用 MFA 的帐户进行身份验证。
我尝试登录的服务公开了此处描述的身份验证端点: https ://developer.okta.com/docs/reference/api/authn/#request-example-for-primary-authentication-with-public-application
当我提供用户名和密码时,它会返回预期的 JSON:
{
"stateToken": "00zQZJ1ZY3Em2401r4T69Dhx35TdF1VTFP5KRTa8ib",
"expiresAt": "2020-05-30T21:11:14.000Z",
"status": "MFA_REQUIRED",
"_embedded": {
"user": {
"id": "00u10vk1torIgBBxxxxx",
"profile": {
"login": "john.doe@email.com",
"firstName": "John",
"lastName": "Doe",
"locale": "en",
"timeZone": "America/Los_Angeles"
}
},
"factors": [{
"id": "ost1g59468dXOddAE0h8",
"factorType": "token:software:totp",
"provider": "OKTA",
"vendorName": "OKTA",
"profile": {
"credentialId": "john.doe@email.com"
},
"_links": {
"verify": {
"href": "https://company.okta.com/api/v1/authn/factors/ost1g59468dXOddxxxxx/verify",
"hints": {
"allow": ["POST"]
}
}
}
}, {
有谁知道我也可以将 2FA 添加到请求中以使其正常工作?
解决方案
推荐阅读
- html - 如何使用数据选择为项目添加颜色
- java - 即使我启用了按钮,它也默认被禁用
- php - Laravel Virgin:在测试利用关系的模型修改器时禁用/模拟数据库连接
- android - 我无法通过 FAB 从主要活动开始活动或片段
- python - 激活 conda 环境后如何仍然使用 anaconda Python3?
- mobile - Katalon iOS 移动自动化,是否可以制作自定义关键字,长按和移动元素(拖放)
- php - 如何解密使用 Openssl 在 bash 脚本中加密的 PHP 文件
- angular - 获取选择一个菜单的默认值
- postgresql - 为什么会出现“架构验证:缺少序列 [SEQ_BANDO]”错误?
- c# - Firebase 查询方法对我不起作用,我似乎找不到任何方法