-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.cs
More file actions
38 lines (33 loc) · 1.29 KB
/
Copy pathConfig.cs
File metadata and controls
38 lines (33 loc) · 1.29 KB
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
using IdentityServer4.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace IdentityServer4.JWE
{
public class Config
{
// clients that are allowed to access resources from the Auth server
public static IEnumerable<Client> GetClients() =>
// client credentials, list of clients
new List<Client>
{
new Client
{
ClientId = "client",
AllowedGrantTypes = GrantTypes.ClientCredentials,
// Client secrets
ClientSecrets =
{
new Secret("secret".Sha256())
},
AllowedScopes = { "api1" }
},
};
// API that are allowed to access the Auth server
public static IEnumerable<ApiResource> GetApiResources() => new List<ApiResource>
{
new ApiResource("api1", "My API")
};
}
}