Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Google Authentication [HostAuthentication(DefaultAuthenticationTypes.ExternalBearer)] returns UNAUTHORIZED

$
0
0

I have a MVC 5 App which is calling a WebAPI.  The WebAPI uses bearer tokens for authentication.  There is one method(action) in the WebAPI which I want to use the token returned by Google for authentication purpose.  In order to do that I do the following to the WebAPI Method

        [OverrideAuthentication]
        [HostAuthentication(DefaultAuthenticationTypes.ExternalBearer)]
        [Route("{userName}")]
        public async Task<User> GetUser(string userName)

Despite this I still get an UNAUTHORIZED error from the WebAPI.  What do I need to do to fix this?


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>