I've been doing the "Getting Started: JS Authentication & Web APIs" guide,
At part 2 when running the web api i get the following exception :
"Could not load type 'System.IdentityModel.Tokens.TokenValidationParameters' from assembly 'System.IdentityModel.Tokens.Jwt, Version=5.0.0.127, Culture=neutral"
The configuration used in the Startup :
app.UseCors(CorsOptions.AllowAll);
app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
{
Authority = "https://localhost:44300",
ClientId = "api",
ClientSecret = "api-secret",
RequiredScopes = new[] { "api" }
});
var httpConfiguration = new HttpConfiguration();
httpConfiguration.MapHttpAttributeRoutes();
httpConfiguration.Filters.Add(new AuthorizeAttribute());
app.UseWebApi(httpConfiguration);
Any ideas to what can be done?
I am confused. The walkthrough is for identityserver3 - but this is the identityserver4 repo.
You are right. excuse me for the mistake,
I should have posted the issue on "IdentityServer3.AccessTokenValidation"
access token validation in OWIN is not compatible with system.identitymodel v5 - you need to downgrade to v4.
OWIN (Katana) has been upgraded to work with IdentityModel v5.
see: https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/wiki/Migrating-from-Katana-(OWIN)-3.x-to-4.x
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
access token validation in OWIN is not compatible with system.identitymodel v5 - you need to downgrade to v4.