Search code examples
asp.net-coreoauth-2.0jwtidentityserver4

Identity Server 4 No Security Token Validator available for token


may somebody help me with this. In last few weeks I have been learning how to use Identity Server 4 and how to implement implicit flow by using Id4 as separate app, angular 4 as client (separate app) and asp.net core api as third one.

I managed to issue id and access tokens from id4 server, add access token into authorization header when I want to call api. But I am getting No SecurityTokenValidator available for token as error.

So what I did wrong?

I am using In Memory test data and AddDeveloperSigningCredential: enter image description here

And on api side I get this: enter image description here

I use UseJwtBearerAuthentication middleware on api side: enter image description here

Thanks in advance.


Solution

  • I solved this at the end. I updated asp.net core to version 2 and added new AspNetCore Authentication JwtBearer middleware in Startup class of Api project and now everything works fine.

    I will attach Startup class of my api project, maybe it can help to someone.

    enter image description here

    enter image description here