Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static IEnumerable<ApiResource> GetApis()
- {
- return new List<ApiResource>
- {
- new ApiResource("CustomerManagementApi", "My CustomerManagementApi"),
- new ApiResource("DashboardApi", "My DashboardApi"),
- // others ...
- };
- }
- public static IEnumerable<Client> GetClients()
- {
- return new List<Client>
- {
- new Client
- {
- ClientId = "client",
- // no interactive user, use the clientid/secret for authentication
- AllowedGrantTypes = GrantTypes.ClientCredentials,
- // secret for authentication
- ClientSecrets =
- {
- new Secret("secret".Sha256())
- },
- // scopes that client has access to
- AllowedScopes = { "CustomerManagementApi" }
- }
- };
- }
- public static List<TestUser> GetUsers()
- {
- return new List<TestUser>
- {
- new TestUser
- {
- SubjectId = "1",
- Username = "alice",
- Password = "password"
- },
- new TestUser
- {
- SubjectId = "2",
- Username = "bob",
- Password = "password"
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement