예제 #1
0
파일: Program.cs 프로젝트: yuzd/lamar
        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;
            });
        }