简体   繁体   中英

How to use existing web form based authentication and authorization in angularjs web api SPA?

I am planning to add new functionalities using angularjs and web api over an existing asp.net webform site. Once finished, both the webforms and the angularjs will coexist. In all the sample applications of angularjs and web api, I see a login page being created and OAuth authentication is being used through the token service. Is there any way I could use the existing webform based authentication/authorization in the newly added angular/web api project? If you know any sample code please let me know.

Thanks

您可以使用Basic身份验证标头查看此示例http://jasonwatmore.com/post/2014/05/26/AngularJS-Basic-HTTP-Authentication-Example.aspx ,在身份验证服务中,调用后端以执行身份验证,并在响应中返回“令牌”(哈希/ base64),并将其分配给Authorization标头。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM