I have an API that sits behind an API Gateway. The API Gateway validates the bearer token before passing the request along to the API.
My API the uses the the asp.net co
I was able to clean up the code a bit, showing that we can just change the flag and with a bit more consistency when setting the flags.
services.AddAuthentication(o =>
{
o.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
o.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
})
.AddJwtBearer(o =>
{
o.RequireHttpsMetadata = false;
o.SaveToken = true;
o.TokenValidationParameters = new TokenValidationParameters
{
ValidateIssuer = false,
ValidateAudience = false,
ValidateIssuerSigningKey = false,
ValidateLifetime = false,
RequireExpirationTime = false,
RequireSignedTokens = false
};
});