Advertisement
Guest User

Untitled

a guest
Jul 19th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. public static List<InMemoryUser> Get()
  2. {
  3. return new List<InMemoryUser>
  4. {
  5. new InMemoryUser
  6. {
  7. Username = "user@domain.com",
  8. Password = "password",
  9. Subject = "user@domain.com",
  10. Claims = new[]
  11. {
  12. new Claim(Constants.ClaimTypes.Id, "96cddc1de66641829237b7f09869b1c8"),
  13. new Claim(Constants.ClaimTypes.Name, "Some Full name example
  14. }
  15. },
  16. };
  17. }
  18.  
  19. ((User as System.Security.Claims.ClaimsPrincipal).Identities.First() as System.Security.Claims.ClaimsIdentity).Claims.ToList()
  20. Count = 10
  21. [0]: {iss: https://localhost:44375}
  22. [1]: {aud: https://localhost:44375/resources}
  23. [2]: {exp: 1468920204}
  24. [3]: {nbf: 1468916604}
  25. [4]: {client_id: my_clientid}
  26. [5]: {scope: openid}
  27. [6]: {http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier: user@domain.com}
  28. [7]: {http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationinstant: 1468916604}
  29. [8]: {http://schemas.microsoft.com/identity/claims/identityprovider: idsrv}
  30. [9]: {http://schemas.microsoft.com/claims/authnmethodsreferences: password}
  31.  
  32. {
  33. "iss": "https://localhost:44375",
  34. "aud": "https://localhost:44375/resources",
  35. "exp": 1468921471,
  36. "nbf": 1468917871,
  37. "client_id": "my_clientid,
  38. "scope": "openid",
  39. "sub": "user@domain.com",
  40. "auth_time": 1468917871,
  41. "idp": "idsrv",
  42. "amr": [
  43. "password"
  44. ]
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement