"IdentityServer": {
"Clients": {
"{CLIENT PROJECT NAME}": {
"Profile": "IdentityServerSPA"
}
},
"Key": {
"Type": "File",
"FilePath": "H:\\root\\home\\xxx-001\\www\\site1\\certificate.pfx",
"Password": "123456"
}
}
Verify if the IdentiyServer is configured properly
navigate to https://your.domain.com/.well-known/openid-configuration in your browser, you should see the discovery document.
{
"issuer": "https://your.domain.com",
"jwks_uri": "https://your.domain.com/.well-known/openid-configuration/jwks",
"authorization_endpoint": "https://your.domain.com/connect/authorize",
"token_endpoint": "https://your.domain.com/connect/token",
"userinfo_endpoint": "https://your.domain.com/connect/userinfo",
"end_session_endpoint": "https://your.domain.com/connect/endsession",
"check_session_iframe": "https://your.domain.com/connect/checksession",
"revocation_endpoint": "https://your.domain.com/connect/revocation",
"introspection_endpoint": "https://your.domain.com/connect/introspect",
"device_authorization_endpoint": "https://your.domain.com/connect/deviceauthorization",
"backchannel_authentication_endpoint": "https://your.domain.com/connect/ciba",
"frontchannel_logout_supported": true,
"frontchannel_logout_session_supported": true,
"backchannel_logout_supported": true,
"backchannel_logout_session_supported": true,
"scopes_supported": [
"openid",
"profile",
"aAPI",
"offline_access"
],
"claims_supported": [
"sub",
"name",
"family_name",
"given_name",
"middle_name",
"nickname",
"preferred_username",
"profile",
"picture",
"website",
"gender",
"birthdate",
"zoneinfo",
"locale",
"updated_at"
],
"grant_types_supported": [
"authorization_code",
"client_credentials",
"refresh_token",
"implicit",
"password",
"urn:ietf:params:oauth:grant-type:device_code",
"urn:openid:params:grant-type:ciba"
],
"response_types_supported": [
"code",
"token",
"id_token",
"id_token token",
"code id_token",
"code token",
"code id_token token"
],
"response_modes_supported": [
"form_post",
"query",
"fragment"
],
"token_endpoint_auth_methods_supported": [
"client_secret_basic",
"client_secret_post"
],
"id_token_signing_alg_values_supported": [
"RS256"
],
"subject_types_supported": [
"public"
],
"code_challenge_methods_supported": [
"plain",
"S256"
],
"request_parameter_supported": true,
"request_object_signing_alg_values_supported": [
"RS256",
"RS384",
"RS512",
"PS256",
"PS384",
"PS512",
"ES256",
"ES384",
"ES512",
"HS256",
"HS384",
"HS512"
],
"authorization_response_iss_parameter_supported": true,
"backchannel_token_delivery_modes_supported": [
"poll"
],
"backchannel_user_code_parameter_supported": true
}
Troubleshoot
Error: NullReferenceException: Object reference not set to an instance of an object.
Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityServerJwtBearerOptionsConfiguration.ResolveAuthorityAndKeysAsync(MessageReceivedContext messageReceivedContext)
Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.AuthenticateAsync()
Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, string scheme)
Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.AuthenticateAsync()
Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, string scheme)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Description: missing definition of the Type of IdentityServer in appsettings.json
Error: Unhandled exception. System.InvalidOperationException: Invalid certificate store location ''.
Description: the Key:Type of IdentityServer is not File
Error: Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'path2')
Description: missing certificate file
Error: Unhandled exception. System.InvalidOperationException: There was an error loading the certificate. No password was provided.
Description: no certificate password was provided
Error: Unhandled exception. System.InvalidOperationException: There was an error loading the certificate. Either the password is incorrect or the process does not have permisions to store the key in the Keyset 'DefaultKeySet'
---> System.Security.Cryptography.CryptographicException: The specified network password is not correct.
Description: incorrect certificate password
Error: Unhandled exception. System.InvalidOperationException: There was an error loading the certificate. Either the password is incorrect or the process does not have permisions to store the key in the Keyset 'DefaultKeySet'
---> System.Security.Cryptography.CryptographicException: The system cannot find the file specified.
Description: require "Load user profile"
Error: Unhandled exception. System.InvalidOperationException: There was an error loading the certificate. Either the password is incorrect or the process does not have permisions to store the key in the Keyset 'DefaultKeySet'
---> System.Security.Cryptography.CryptographicException: The profile for the user is a temporary profile.
Description: require ApplicationPoolIdentity
Reference: