First, I want to explain the difference between OAuth and OpenID. User adrianbanks contrasts two wells in this answer . To sum up, OpenID is about authentication - proving who you are. Although OAuth is about authorization - you have access to the functions, data, and your application. Now back to your question.
If you need OAuth or not, you should learn OWIN (Open Web Interface for.NET) Middleware. We are currently using OWIN to implement our open API with the OAuth 2.0 Authorization Server . However, OWIN is not limited to implementing an OAuth authentication server. Definitely let him see if he can fit your needs.
In your case, an OAuth 2.0 implementation might not be necessary; however this is what i recommend. For this problem, this is a good, safe solution. This will not only solve this problem, but also in the future, if you want to allow users to authorize third-party integrations, OAuth - a safer option - will already be implemented.
If you donβt have users using third-party integrations, you can use the API keys. As long as you implement it in a safe way, this is a good option. If this is more than what you are looking for, read this post about using API keys to securely authenticate (and authorize) third-party applications for the ASP.NET Web API Project.
source share