auth0-aspnetcore icon indicating copy to clipboard operation
auth0-aspnetcore copied to clipboard

Security Validator for Token!

Open UncleFirefox opened this issue 8 years ago • 2 comments

Hi! I'm giving the API demo a try and I'm finding the following issue:

Application started. Press Ctrl+C to shut down. info: Microsoft.AspNet.Hosting.Internal.HostingEngine[1] Request starting HTTP/1.1 GET http://localhost:5001/api/secured/ping application/json fail: Microsoft.AspNet.Authentication.JwtBearer.JwtBearerMiddleware[0] Exception occurred while processing message System.InvalidOperationException: No SecurityTokenValidator available for token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik1UQXlRalJCT0VNNE16WXlSa00wUWpjM01EUkJPREZGTmtSRU9VVXhRekk1UmpBM01VRTRPUSJ9.eyJpc3MiOiJodHRwczovL3VuY2xlZmlyZWZveC5ldS5hdXRoMC5jb20vIiwic3ViIjoiYXV0aDB8NTY3M2ZkMTg4YWE3MTcwZTY1MDQ1NmI4IiwiYXVkIjoiS1RqR3Bwd2cwNzc3bkF1QWxnMzFqNWRKT2tGdHl2RzAiLCJleHAiOjE0NTA0Nzg5NTMsImlhdCI6MTQ1MDQ0Mjk1M30.JEc_ozd1_PXrJDbY8IG3jOkVErPdzhFb_2i8dIf_DcFMGz3dxVLyai8Gq0lizmFHm4EB4jQC2f3Q6PeTVHTC3KCqDGJzAbf2OrYJSNXck_N0NAEzcLuECcCyLYCbbuk3W3peqZs0RPi0HLiCndEfstbgr08MBPsOwPi3N6QDDZOruuIhRySIffdozd9NLQYZvCw3QbtydSQLglDdG-4VWdvmYjPOSoax2dD5jUl89--xGUkpNm9qqPngHdlNkXtVdesdlNMwvIFbFHNeVYToUYqASHnUD3DLiKWHGxT0xgFzzWgNn4rv1udjWwdONTAdRe4-d9A8a9hpzB4qhnKTow.eyJpc3MiOiJodHRwczovL3VuY2xlZmlyZWZveC5ldS5hdXRoMC5jb20vIiwic3ViIjoiYXV0aDB8NTY3M2ZkMTg4YWE3MTcwZTY1MDQ1NmI4IiwiYXVkIjoiS1RqR3Bwd2cwNzc3bkF1QWxnMzFqNWRKT2tGdHl2RzAiLCJleHAiOjE0NTA0NzgxMDAsImlhdCI6MTQ1MDQ0MjEwMH0.hhX54_mdBW6IgW0w-_OfS0NjJqYO4kov97RGROzlhdU at Microsoft.AspNet.Authentication.JwtBearer.JwtBearerHandler.<HandleAuthenticateAsync>d__1.MoveNext()

I put the token in RS256 as stated in the instructions with no luck. :(

Any ideas?

UncleFirefox avatar Dec 18 '15 13:12 UncleFirefox

Turns out that when i changed the scope to get the token from "openid" to: "openid name email" it worked. Is it the normal behavior?

UncleFirefox avatar Dec 18 '15 14:12 UncleFirefox

@AlFranco Can you please confirm whether you have issues on ASP.NET Core 1.0 ?

Also, you can refer to the ASP.NET Core samples:

  • https://github.com/auth0-samples/auth0-aspnetcore-webapi-rs256
  • https://github.com/auth0-samples/auth0-aspnetcore-webapi-hs256

jerriep avatar Jul 21 '16 07:07 jerriep