Beispiel #1
0
        public void Configuration(IAppBuilder app)
        {
            var users = new List <InMemoryUser>
            {
                new InMemoryUser
                {
                    Subject  = "E4A8B8DA-87F9-41CB-AA33-F79E621B3A56",
                    Username = "******",
                    Password = "******",
                    Claims   = new List <Claim>
                    {
                        new Claim("email", "*****@*****.**"),
                        new Claim("role", "badmin")
                    }
                }
            };

            var factory =
                new IdentityServerServiceFactory()
                .UseInMemoryUsers(users)
                .UseInMemoryScopes(new List <Scope>())
                .UseInMemoryClients(new List <Client>());

            app.UseIdentityServer(new IdentityServerOptions
            {
                Factory             = factory,
                SigningCertificate  = Cert.LoadSigning(),
                PluginConfiguration = PluginConfiguration
            });
        }