简体   繁体   English

.Net web API 托管在 IIS 中(API 使用 Bearer Token 进行身份验证)

[英].Net web API hosting in IIS (API uses Bearer Token for authentication)

I am developing one public-internet facing Angular application which call one .Net Proxy API (exposed to internet) which will internally call actual .net API (hosted on-premise). I am developing one public-internet facing Angular application which call one .Net Proxy API (exposed to internet) which will internally call actual .net API (hosted on-premise). Angular app will get Bearer token from Okta and then call.Net Proxy API. Angular 应用程序将从 Okta 获取 Bearer 令牌,然后调用.Net Proxy API。 I wanted to know in such scenario where Bearer token will be used for authentication, When I host .net proxy API and.Net actual API in IIS, what i should be selecting in IIS for authentication? I wanted to know in such scenario where Bearer token will be used for authentication, When I host .net proxy API and.Net actual API in IIS, what i should be selecting in IIS for authentication? Basic or windows or Anonymous or something else?基本或 windows 或匿名或其他?

Flow is: Angular -> OKTA -> Token ->.Net Proxy API ->.Net API -> Database流程为:Angular -> OKTA -> Token ->.Net Proxy API ->.Net API -> 数据库

If the user has to "login" after connecting to your.Net proxy API or.Net API then you will need to allow Anonymous Auth.如果用户在连接到您的 .Net 代理 API 或 .Net API 后必须“登录”,那么您需要允许匿名身份验证。 If they will always definitely have credentials by the time they hit IIS, you will want Basic Authentication.如果他们在到达 IIS 时肯定总是拥有凭据,那么您将需要基本身份验证。 You will likely not want Windows Authentication enabled unless you are going to use windows logins for auth.您可能不希望启用 Windows 身份验证,除非您打算使用 windows 登录进行身份验证。

This article is old, but should still explain what each auth method does. 这篇文章很旧,但仍应解释每种身份验证方法的作用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 由于 OWIN 身份验证管理器,具有不记名令牌的 .NET Web API 应用程序停止工作 - .NET Web API apps with bearer token stopped working due to OWIN authentication manager .NET Core 2.2 Web API Azure门户AD身份验证| 如何使用有效的Bearer令牌获取用户信息? - .NET Core 2.2 Web API | Azure Portal AD Authentication | How to get user info with a valid Bearer Token? Angular和Web Api 2身份验证:承载令牌 - Angular and Web Api 2 Authentication: Bearer Tokens 用户身份验证之前的初始 API 令牌 - .NET 核心 Web API - Initial API token before user authentication - .NET core Web API .NET Web API自托管 - .Net web api self hosting 如何通过桌面/控制台应用程序使用带有不记名令牌的 ASP.NET Web API 2.0 - How to consume ASP.NET Web API 2.0 with bearer token via a desktop/console application 如何使用 JWT 令牌授权用户响应 asp net core web api。 何时使用授权标头不记名令牌? - How to use JWT token to authorize user from react to asp net core web api. When to use autorization header bearer token? Web API从自定义身份验证提供程序验证JWT承载令牌 - Web API Validate JWT Bearer Token from Custom Auth Provider 自托管 ASP.NET Web API 时未找到 404,在 IIS 中工作正常 - 404 not found when self hosting ASP.NET Web API, works fine within IIS 托管asp.net web api应用程序时无法访问iis内的子文件夹 - Unable to access subfolder inside iis when hosting asp.net web api application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM