简体   繁体   English

OWIN OAuth 2.0授权服务器

[英]OWIN OAuth 2.0 Authorization Server

I have read the tutorial http://www.asp.net/aspnet/overview/owin-and-katana/owin-oauth-20-authorization-server and realized that this is what I really want to secure my web APIs. 我已经阅读了http://www.asp.net/aspnet/overview/owin-and-katana/owin-oauth-20-authorization-server教程,并意识到这是我真正想要保护Web API的安全。 so I downloaded the project code and added to my API's MVC project. 因此我下载了项目代码并将其添加到我API的MVC项目中。 Actually my project is divided into 2 parts, the MVC_application (for displaying data from web API's) and the MVC_API where my API's are configured. 实际上,我的项目分为两部分,MVC_application(用于显示来自Web API的数据)和配置了我的API的MVC_API。 so now I have three projects (MVC_application, MVC_API and AuthorizationServer) 所以现在我有三个项目(MVC_application,MVC_API和AuthorizationServer)

My question is: Howcan I link the AuthorizationServer to my project? 我的问题是:如何将AuthorizationServer链接到我的项目?

In other words: how do I tell the application to call AuthorizationServer before calling the MVC_API project to read the data? 换句话说:如何在调用MVC_API项目读取数据之前告诉应用程序调用AuthorizationServer?

You need to secure your web api project, and handle in your mvc project , unauthorized responses from your web api service. 您需要保护Web api项目的安全,并在mvc项目中处理来自Web api服务的未经授权的响应。 For call your web api, you need to call first to your authorization server , get the bearer token and include the header in your subsequent requests to your web api service. 要调用Web api,您需要先调用授权服务器 ,获取承载令牌并将标头包含在对Web api服务的后续请求中。

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

相关问题 OAuth 2.0登录名(早期版本)已弃用&ASP.NET Owin - OAuth 2.0 Login (early version) deprecated & ASP.NET Owin ASP.NET WEB API ACS oAuth 2.0与OWIN - ASP.NET WEB API ACS oAuth 2.0 vs OWIN 如何创建OAuth授权服务器 - how to create OAuth Authorization Server 在MVC OWIN中检索授权服务器中资源服务器的URL - Retrieve the url of the Resource Server within the Authorization Server in MVC OWIN 在OWIN授权服务器中明确获取访问令牌和刷新令牌? - Explicitly getting access token and refresh token in OWIN Authorization Server? 我们如何在SignalR中预先形成基于OWIN oAuth Bearer令牌的身份验证和授权? - How do we preform OWIN oAuth Bearer token based Authentication and Authorization in SignalR? OAuth和OWIN身份验证-混淆 - OAuth and OWIN Authentication - Confusion OAuth-授权服务器(如果托管在Web场中)如何生成承载令牌 - OAuth - Authorization server if hosted on web farm how to generate bearer token 如何进行应用程序到应用程序(服务器到服务器)身份验证,OAuth 2.0,Web API 2.0 - How to do Application to application (server to server) authentication, OAuth 2.0, Web API 2.0 具有应用内授权的OWIN WsFederation身份验证 - OWIN WsFederation authentication with in-app authorization
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM