Thinktecture Identity Server 3 Asp.Net Identity Sample, constantly getting 401 authorization denied -


i trying asp.net identity sample of identity server working in web api project, , beginner trying work on getting tokens , sending request apis using the bearer tokens.

so using fiddler, can send request https://localhost:44333/core/connect/token following content: client_id=roclient&client_secret=secret&grant_type=password&username=bob&password=mypass&scope=read write offline_access , works fine, access token , refresh token.

then have web api project in solution, has code use bearer token:

app.useidentityserverbearertokenauthentication(new identityserverbearertokenauthenticationoptions         {             authority = "https://localhost:44333",             validationmode = validationmode.validationendpoint,              requiredscopes = new[] { "api1" }         }); 

and test controller in api protected using [authorize] decorator.

as said, fetching token works fine, when use fiddler send request api "401 authorization denied..." thing.

what put in fiddler request of course:

authorization: bearer eyj0exaioijkv1qilcjhbgcioijsuzi1niising1dci6ime...

am doing anythign wrong?

in token request, requesting read , write scope. api checks api1 scope. cannot work.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -