public static IServiceCollection ConfigAuthentication(this IServiceCollection services) { services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddJwtBearer(options => options.TokenValidationParameters = JwtHelper.DefaultOptions().TokenValidationParameters); return(services); }