ASP.net Web API RESTful web service + Basic authentication

后端 未结 3 534
情歌与酒
情歌与酒 2020-12-08 02:50

I\'m implementing a RESTful web service using ASP.Net Web Api. I have concluded to use Basic authentication + SSL to do the authentication part. What is the best/correct way

3条回答
  •  攒了一身酷
    2020-12-08 03:30

    Jamie Kurtze provides a good explanation of using Basic Authentication here ASP.NET Web API REST Security Basics

    From my understanding, if you want your requests to be stateless then each request will require the Authentication field to be set

    Jamie Kurtze wraps the necessary code in a class derived from DelegateHandler, while Rick Strahl checks if the call is valid using a Filter. You can read more at his blog post on this topic at A WebAPI Basic Authentication Authorization Filter

提交回复
热议问题