-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenIdConnectConfiguration.Create(string json) throws deserialization exception when security keys present in json #1242
Comments
@Francois-du-Plessis do you have the json? |
|
Most likely connected with #1124. I have the same issue with creating |
Our It seems like the JSON you're using has a 'SigningKeys' parameter, and by default JsonConvert was trying to deserialize the values associated with this parameter into the Since 'SigningKeys' is not one of the defined OpenIdConnect parameter values, you'll be able to find the value of this parameter on |
@mafurman If the SigningKeys property can only be populated from the 'jwks_uri', how would I be able to cache the metadata of the authentication scheme during Startup, so that a first request to the API does not have to be delayed by this? |
Version: 5.5.0
When trying to create a new
OpenIdConnectConfiguration
object from a json string created with theOpenIdConnectConfiguration.Write
static method a deserialization exception is thrown with the following error message:Could not create an instance of type Microsoft.IdentityModel.Tokens.SecurityKey. Type is an interface or abstract class and cannot be instantiated. Path 'SigningKeys[0].KeySize'
I used the
OpenIdConnectConfigurationRetriever
class to initially create the OpenIdConnectConfiguration object. So doing something like the following throws the exception for me:The text was updated successfully, but these errors were encountered: