IdentityServe4身份验证API

时间:2019-10-01 14:23:47

标签: authentication identityserver4

我一直在研究IdentityServer4。我目前有Web客户端,其中使用IS快速入门。现在,我想尽快为我的移动客户端提供身份验证API。

基本上,身份验证API应该像这样工作:

  1. 获取用户名和密码凭据
  2. 使用IS进行身份验证
  3. 将返回到承载令牌

到目前为止,我所做的是针对Web客户端的。如前所述,其中使用了IS快速入门。

1 个答案:

答案 0 :(得分:0)

您可以使用混合流。检查https://github.com/IdentityModel/IdentityModel.OidcClient.Samples

中的样本

但是,如果您希望拥有自己的登录屏幕,则可以使用资源所有者密码授予

https://github.com/IdentityServer/IdentityServer4/tree/master/samples/Quickstarts/2_ResourceOwnerPasswords