Esempio n. 1
0
        public static void AddAuthenticationUser(this IServiceCollection services, IConfiguration Configuration)
        {
            services.AddTransient <AccountService>();

            services.AddAuthentication(x =>
            {
                x.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
                x.DefaultChallengeScheme    = JwtBearerDefaults.AuthenticationScheme;
            })
            .AddJwtBearer(x => JWTManager.BuldJWTOption(Configuration, x));
        }