【问题标题】:ServiceStack with IdentityServer4 intergrationServiceStack 与 IdentityServer4 集成
【发布时间】:2019-02-17 17:21:30
【问题描述】:

我找不到有关同时使用这两个框架的答案。

我们计划构建一个身份提供者服务(如 Google 帐户),用于对用户进行身份验证并向 Rely Party 应用提供 OpenId 连接协议。我们在 ServiceStack 中构建了现有的项目,这些项目运行良好。但是,ServiceStack 在验证用户方面似乎与 IdentityServer4 不兼容。 ServiceStack 有自己的身份验证机制,IdentityServer4 依赖于 Asp.NET Identity Model。如果我通过 ASP.NET 身份模型登录,ServiceStack API 可能无法识别用户已登录。反之亦然。

是否有任何建议表明这是一个死胡同或一些可以使它们一起工作的解决方案?

【问题讨论】:

    标签: servicestack identityserver4


    【解决方案1】:

    mvcidentityserver 项目模板包含一个预配置的 ServiceStack + IdentityServer4 启动项目模板:

    $ dotnet tool install -g x
    
    $ x new mvcidentityserver ProjectName
    

    有关 ServiceStack + IdentityServer4 集成的更多信息,请参阅Using IdentityServer4 Auth in ServiceStack 文档。

    此外,ServiceStack 社区还提供了几个选项:

    【讨论】:

      猜你喜欢
      • 2017-04-28
      • 2018-09-19
      • 2020-09-22
      • 2019-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-07
      • 1970-01-01
      相关资源
      最近更新 更多