-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfig.cs
85 lines (83 loc) · 2.88 KB
/
Config.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
using IdentityServer4.Models;
using IdentityServer4.Test;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
namespace DE.IDP
{
public class Config
{
public static List<TestUser> GetUsers()
{
return new List<TestUser>
{
new TestUser
{
SubjectId = "d860efca-22d9-47fd-8249-791ba61b07c7",
Username = "Frank",
Password = "password",
Claims = new List<Claim>
{
new Claim("given_name", "Frank"),
new Claim("family_name", "Underwood"),
}
},
new TestUser
{
SubjectId = "b7539694-97e7-4dfe-84da-b4256e1ff5c7",
Username = "Claire",
Password = "password",
Claims = new List<Claim>
{
new Claim("given_name", "Claire"),
new Claim("family_name", "Underwood"),
}
}
};
}
public static IEnumerable<IdentityResource> GetIdentityResources()
{
return new List<IdentityResource>
{
new IdentityResources.OpenId(),
new IdentityResources.Profile()
};
}
public static IEnumerable<Client> GetClients()
{
return new List<Client>()
{
new Client
{
ClientName = "Diamond Edge Service",
AccessTokenType = AccessTokenType.Reference,
AllowedGrantTypes = GrantTypes.Implicit,
AllowAccessTokensViaBrowser = true,
RedirectUris = new List<string>
{
"http://localhost:8080"
},
PostLogoutRedirectUris = new List<string>
{
"http://localhost:8080/Unauthorized"
},
AllowedCorsOrigins = new List<string>
{
"http://localhost:8080"
},
AllowedScopes = new List<string>
{
"openid",
"dataEventRecords",
"dataeventrecordsscope",
"securedFiles",
"securedfilesscope",
"role"
}
}
};
}
}
}