예제 #1
0
        public void InstallServices(IServiceCollection services, IConfiguration configuration)
        {
            var facebookAuthSettings = new FaceBookAuthSettings();

            configuration.Bind(nameof(facebookAuthSettings), facebookAuthSettings);
            services.AddSingleton(facebookAuthSettings);

            services.AddHttpClient();
            services.AddSingleton <IFacebookAuthService, FacebookAuthService>();
        }
예제 #2
0
 public FacebookAuthService(FaceBookAuthSettings faceBookAuthSettings, IHttpClientFactory httpClientFactory)
 {
     _faceBookAuthSettings = faceBookAuthSettings;
     _httpClientFactory    = httpClientFactory;
 }