如何使用key斗篷restapi使用sms-otp无密码身份验证进行登录?

lb3vh1jj  于 2021-06-29  发布在  Java
关注(0)|答案(0)|浏览(313)

我已经从github修改了一些sms otp身份验证spi,并成功地将其用于keydepot身份验证。然后我为浏览器创建了一个自定义流,以便:
仅用户名窗体获取用户名(可能是手机号码)
向移动用户发送代码
获取代码并对用户进行身份验证
以上作品太好了!现在我需要在restapi中使用相同的方法。在使用文档时,他们说我们必须设置授权类型。但在所有示例中,授权类型都是password。

curl -L -X POST 'http://localhost:8080/auth/realms/apiman/protocol/openid-connect/token' \
 -H 'Content-Type: application/x-www-form-urlencoded' \
 --data-urlencode 'client_id=account' \
 --data-urlencode 'grant_type=password' \
 --data-urlencode 'client_secret=xxxxxxxxxxxxxxxxxxx' \
 --data-urlencode 'scope=openid' \
 --data-urlencode 'username=otp'

顺便说一句:我添加了与表单绑定相同的直接授权绑定(效果很好),但运气不好。如何将restapi用于与表单身份验证相同的登录流?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题