Пример #1
0
        public void ConfigureContainer(ServiceRegistry services)
        {
            services.AddMvc();
            services.AddLogging();
            services.AddIdentityServer()
            .AddDeveloperSigningCredential()
            .AddInMemoryApiResources(Config.GetApiResources())
            .AddInMemoryClients(Config.GetClients());

            services.For <IMessageMaker>().Use(new MessageMaker("Hey there."));

            services.AddAuthentication()
            .AddIdentityServerAuthentication(options =>
            {
                options.Authority            = "auth";
                options.RequireHttpsMetadata = true;
            })


            .AddFacebook(facebookOptions =>
            {
                facebookOptions.AppId     = "something";
                facebookOptions.AppSecret = "else";
            });
        }
Пример #2
0
 public void ConfigureContainer(ServiceRegistry services)
 {
     services.AddMvc();
     services.AddLogging();
     services.AddIdentityServer()
     .AddDeveloperSigningCredential()
     .AddInMemoryApiResources(Config.GetApiResources())
     .AddInMemoryClients(Config.GetClients());
     services.For <IMessageMaker>().Use(new MessageMaker("Hey there."));
 }
Пример #3
0
        public void ConfigureContainer(ServiceRegistry services)
        {
            services.AddMvc();
            services.AddLogging();
            services.AddIdentityServer()
            .AddDeveloperSigningCredential()
            .AddInMemoryApiResources(Config.GetApiResources())
            .AddInMemoryClients(Config.GetClients());
            services.For <IMessageMaker>().Use(new MessageMaker("Hey there."));

            services.AddHealthChecks();

            services.AddHealthChecksUI();

            services.AddAuthentication()
            .AddIdentityServerAuthentication(options =>
            {
                options.Authority            = "auth";
                options.RequireHttpsMetadata = true;
            });
        }