authentication - 使用 .Net core 2.2 Web API 验证 .Net 4.x 应用程序
问题描述
我正在 .Net Core 2.2 中制作令牌身份验证 Web API,尚未决定是否应该使用 OWIN 或 identityserver4。
在我们的 Intranet 上,我们有许多在 .Net 4.5 中制作的应用程序以及在 .Net Core 2.2 中制作的一些最新应用程序。
是否可以在 .Net Core 2.2 Web API 上对它们进行身份验证?
解决方案
您可以使用在 .NET Core 2.2 应用程序中运行的 IdentityServer4,它可以为您的所有应用程序提供令牌身份验证。这使用 OAuth2,它将为您提供一个令牌,该令牌可以在对您的 API 的后续 HTTP 请求的 HTTP 请求授权标头中设置。您根本不需要使用 cookie。
https://identityserver4.readthedocs.io/en/latest/intro/big_picture.html
推荐阅读
- git - git错误:RPC失败;HTTP 502 curl 22 The requested URL returned error: 502 fatal: 远端意外挂断
- python - 为什么我的终端不允许使用 pip?但允许 pip3
- c++ - 运算符重载 += 添加新对象
- python - 使用 BaseEstimator、TransformerMixin 自定义 Transformer
- javascript - 在交易视图订单上使用 javascript 更改价格值的想法
- kubernetes - 如何在公有云中获取 LBaaS 的公有 IP?
- java - 在 Java 中避免泛型的冗余参数
- jinja2 - 编写sql时如何在python jinja2中使用基本模板中的{%extends%}
- django - 表单未保存到用户模型 Django
- c# - 具有新 sdk 样式 csproj 的附加 nuget 依赖项