Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- using IdentityServer4.Models;
- using IdentityServer4.Test;
- namespace App1
- {
- static class Config
- {
- public static IEnumerable<ApiResource> GetApiResources()
- {
- return new List<ApiResource>
- {
- new ApiResource("app2api", "My API")
- };
- }
- public static IEnumerable<Client> GetClients()
- {
- return new List<Client>
- {
- new Client
- {
- ClientId = "ro.client",
- AllowedGrantTypes = GrantTypes.ResourceOwnerPassword,
- ClientSecrets =
- {
- new Secret("secret".Sha256())
- },
- AllowedScopes = { "app2api" }
- }
- };
- }
- 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"
- }
- };
- }
- }
- }
Add Comment
Please, Sign In to add comment