【问题标题】:IdentityServer 4 as a web APIIdentityServer 4 作为 Web API
【发布时间】:2018-01-28 03:08:21
【问题描述】:

如何在 .net core 中使用身份服务器 4 作为 Web API?

是否有任何可用的示例应用程序。

在他们的示例应用程序中,他们重定向到登录页面,然后进行身份验证。

我想使用服务而不重定向到登录页面。

【问题讨论】:

    标签: security asp.net-web-api asp.net-core .net-core identityserver4


    【解决方案1】:

    您需要通过 IDS4 对 api 进行身份验证,而不是没有登录页面。您可以使用服务帐户,该帐户基本上是用户名和密码以及额外的共享密钥,或者您可以允许客户端令牌流过并代表那里进行调用。

    代表您拨打电话时,需要对令牌有离线访问权限并使用刷新令牌处理拨打电话,下面的链接包含您应该需要的所有信息。

    https://github.com/IdentityServer/IdentityServer4.Samples/tree/release/Quickstarts/5_HybridFlowAuthenticationWithApiAccess

    【讨论】:

    • 我需要从 javascript 客户端调用它。你能帮忙吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-05
    • 2017-12-07
    • 2019-06-01
    • 2020-04-22
    • 2017-07-25
    相关资源
    最近更新 更多