Guest User

Untitled

a guest
Nov 22nd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. new Client
  2. {
  3. ClientName = "Silicon on behalf of Carbon Client",
  4. ClientId = "carbon",
  5. Enabled = true,
  6. AccessTokenType = AccessTokenType.Jwt,
  7.  
  8. Flow = Flows.ResourceOwner,
  9.  
  10. ClientSecrets = new List<Secret>
  11. {
  12. new Secret("secret".Sha256())
  13. },
  14.  
  15. AllowedScopes = new List<string>
  16. {
  17. "api1", "offline_access"
  18. }
  19. }
  20.  
  21. public void Configuration(IAppBuilder app)
  22. {
  23. var factory = new IdentityServerServiceFactory()
  24. .UseInMemoryUsers(Users.Get())
  25. .UseInMemoryClients(Clients.Get())
  26. .UseInMemoryScopes(Scopes.Get());
  27.  
  28. var options = new IdentityServerOptions
  29. {
  30. SigningCertificate = Certificate.Load(),
  31. Factory = factory,
  32. RequireSsl = false
  33. };
  34.  
  35. app.Map("/core", idsrvApp =>
  36. {
  37. idsrvApp.UseIdentityServer(options);
  38. });
  39. }
Add Comment
Please, Sign In to add comment