Every request that hits my Asp.Net Core Web API is rejected as 401 unauthorized, despite it working as expected on my local development environment.
I've configured the Asp.Net Core web API to authenticate incoming requests using Bearer tokens signed by a certificate installed on my server running Windows Server 2016.
I've made sure the incoming tokens include the expected payload and have been signed using the correct certificate.
The certificate is retrieved by it's thumbprint which I'm storing in my Asp.Net Core application's appsettings.json file.
Here's an extract of the appsettings.json file:
{
...
"Auth": {
"Issuer": "{allowed_issuer}",
"Audience": "{allowed_audience}",
"Certificate": {
"Thumbprint": "{allowed_thumbprint}"
}
},
...
}