1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
|
---|
2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
|
---|
3 |
|
---|
4 |
|
---|
5 | using IdentityModel;
|
---|
6 | using IdentityServer4.Test;
|
---|
7 | using System.Collections.Generic;
|
---|
8 | using System.Security.Claims;
|
---|
9 |
|
---|
10 | namespace IdentityServerHost.Quickstart.UI
|
---|
11 | {
|
---|
12 | public class TestUsers
|
---|
13 | {
|
---|
14 | public static List<TestUser> Users = new List<TestUser>
|
---|
15 | {
|
---|
16 | new TestUser{SubjectId = "818727", Username = "alice", Password = "alice",
|
---|
17 | Claims =
|
---|
18 | {
|
---|
19 | new Claim(JwtClaimTypes.Name, "Alice Smith"),
|
---|
20 | new Claim(JwtClaimTypes.GivenName, "Alice"),
|
---|
21 | new Claim(JwtClaimTypes.FamilyName, "Smith"),
|
---|
22 | new Claim(JwtClaimTypes.Email, "AliceSmith@email.com"),
|
---|
23 | new Claim(JwtClaimTypes.EmailVerified, "true", ClaimValueTypes.Boolean),
|
---|
24 | new Claim(JwtClaimTypes.WebSite, "http://alice.com"),
|
---|
25 | new Claim(JwtClaimTypes.Address, @"{ 'street_address': 'One Hacker Way', 'locality': 'Heidelberg', 'postal_code': 69118, 'country': 'Germany' }", IdentityServer4.IdentityServerConstants.ClaimValueTypes.Json)
|
---|
26 | }
|
---|
27 | },
|
---|
28 | new TestUser{SubjectId = "88421113", Username = "bob", Password = "bob",
|
---|
29 | Claims =
|
---|
30 | {
|
---|
31 | new Claim(JwtClaimTypes.Name, "Bob Smith"),
|
---|
32 | new Claim(JwtClaimTypes.GivenName, "Bob"),
|
---|
33 | new Claim(JwtClaimTypes.FamilyName, "Smith"),
|
---|
34 | new Claim(JwtClaimTypes.Email, "BobSmith@email.com"),
|
---|
35 | new Claim(JwtClaimTypes.EmailVerified, "true", ClaimValueTypes.Boolean),
|
---|
36 | new Claim(JwtClaimTypes.WebSite, "http://bob.com"),
|
---|
37 | new Claim(JwtClaimTypes.Address, @"{ 'street_address': 'One Hacker Way', 'locality': 'Heidelberg', 'postal_code': 69118, 'country': 'Germany' }", IdentityServer4.IdentityServerConstants.ClaimValueTypes.Json),
|
---|
38 | new Claim("location", "somewhere")
|
---|
39 | }
|
---|
40 | }
|
---|
41 | };
|
---|
42 | }
|
---|
43 | } |
---|