There is an amazing feature in mvc 4 internet application template which can easily integrate with facebook twitter and google. But there is no such feature in web api template.
How can I easily integrate DotNetOpenAuth
with web api?
Is there a tutorial?
相关问题
- Obtaining Refresh Token from lepture/Authlib throu
- YouTube API refresh token revoked with 400 code “i
- Azure AD OAuth client credentials grant flow with
- Authenticating to Google Cloud Endpoints as iOS ap
- How to create anchor href using Html.Helper [dupli
相关文章
- MVC CDN fallback for Style Bundle
- Add to htmlAttributes for custom ActionLink helper
- Disable action method from being called from the a
- Why is redirect_uri required on Access Token reque
- User.Identity.IsAuthenticated vs WebSecurity.IsAut
- Is there a way to update asp.net mvc bundle conten
- Django REST Framework - OAuth2 Consumer API from e
- MVC4 - ContextDependentView - What does it mean?
MVC is a browser-facing web site. WebAPI is for programmatic access by some client other than a browser web page (although it may be javascript running in the browser). So OpenID or OAuth login flows that require browser redirects don't make sense for WebAPI. Not directly anyway.
What does seem to apply is that you want your WebAPI to be authorized, and to know what user they represent. The common case then is for WebAPI to act as an OAuth 2 resource server, accepting access tokens that were issued by an authorization server that does accept Facebook, Twitter and Google to log in users before minting these access tokens.
There are several WebAPI samples that do this. Here's one.