Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Configure JWT services
- builder.Services
- .AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
- .AddJwtBearer(o => {
- var Key = Encoding.UTF8.GetBytes("12345678901234567890123456789012");
- o.TokenValidationParameters = new TokenValidationParameters
- {
- ValidateIssuer = false,
- ValidateAudience = false,
- IssuerSigningKey = new SymmetricSecurityKey(Key)
- };
- });
- // Use authentication / authorization middleware
- app.UseAuthentication();
- app.UseAuthorization();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement