示例#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;
            });
        }