1

Folks - i am not sure if this is logical, but wanted to know if this can be done. I have a asp.net Web API 2 that is using Owin startup. Is there a mechanism where I can have clients of this API pass Claims Identity along with the access token and build authorization based on claims. Clients that uses this api can be Angular or ASP.Net MVC4 applications.

I have been trying with sample code from Auth0 to do this, but not able to pass the Identity Claims to the api from the MVC application. Access token with only scope is passed as bearer token.

Can anyone provide few pointers on how to do this.

Thanks - Sriraj

SrirajM
  • 33
  • 2

1 Answers1

0

Check pluralsight course on Auth0, it describes in detail as how to implement claims based authentication with Auth0:

https://www.pluralsight.com/courses/authenticating-angular-spa-aspnet-webapi-auth0

You cab get free trial.

vish.Net
  • 962
  • 2
  • 10
  • 21
  • 1
    Good course - but it does not give in depth details about passing the claims all the way to API. I figured out that I have to use Auth0 delegation but cannot get it to work - its always 401 from the API. – SrirajM Dec 19 '16 at 03:52
  • Figured out finally - it was an issue in JWT.dll as mentioned here: http://stackoverflow.com/questions/10055158/is-there-a-json-web-token-jwt-example-in-c. Made the fix on the source of JWT.dll (https://github.com/jwt-dotnet/jwt) and now it work. – SrirajM Dec 19 '16 at 05:04