hi,
I use this code at startup:
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
{
options.TokenValidationParameters = new TokenValidationParameters
{
ValidateIssuerSigningKey = true,
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8
.GetBytes(Configuration.GetSection("AppSettings:Key").Value)),
ValidateIssuer = false,
ValidateAudience = false
};
});
and then I use Authorize Attribute to protect my controllers. is there any way to change the IssuerSigningKey later on after startup?
thanks