Hello,
I have IdentityServer4 - .net core 3.0 (latest - right now rc1)
I have WebApi - .net core 3.0 (latest - right now rc1)
I have WebApi .net 4.6
After I upgrade nuget for IdentityServer4 to latest one or even to 3.0.0-preview7.33 or 3.0.0-preview8.19 - authoization for WebApi .net 4.6 stop working - "Message": "Authorization has been denied for this request."
I think problem is in dependencies:
Could you advise some solution? Or I should use IdentityServer4 3.0.0-preview3.4 till I have .net 4.6 WebApi?
Many thanks,
Best regards,
Serhii Kryvets
Hard to tell. Probably wait until everything is finally released.
Thanks for reply.
Do you know if there is some example how to connect WebApi .NET 4.6 to IdentityServer4?
You can use Microsoft's standard JWT authentication middleware.
Similar: #3705
There seem to be 2 issues
a) the typ header has changed - it seems older versions of Microsoft JWT handler don't like this
b) we removed the /resources audience from our tokens (because of a))
Were you able to solve the problem?
I'm experiencing this issue with OWIN based clients. The solution I'm considering is:
1) Set typ header back to "JWT" using AccessTokenJwtType on IdentityServerOptions
2) Extend DefaultTokenService to add /resources back to aud
3) Eventually upgrade clients to a new token validation library that works with the new style tokens
If you want to work on a PR for that
https://github.com/IdentityServer/IdentityServer4/issues/3741
I just added a switch to bring back the /resources audience. It defaults to off - but you can turn it on for better compat with older token validators.
It will be released with 3.0.2 - today or tomorrow...
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I'm experiencing this issue with OWIN based clients. The solution I'm considering is:
1) Set typ header back to "JWT" using
AccessTokenJwtTypeonIdentityServerOptions2) Extend
DefaultTokenServiceto add/resourcesback toaud3) Eventually upgrade clients to a new token validation library that works with the new style tokens