小编Kod*_*zzz的帖子

身份服务器收到“错误”:“invalid_scope”

我在尝试获取自定义范围值的令牌时遇到错误。下面是我的代码片段。

public static IEnumerable<ApiResource> GetApis() =>
        new List<ApiResource>
        {
             new ApiResource("ApiOne","ApiOne",new []{ "ApiOne"})
        };
public static IEnumerable<Client> GetClients() =>
        new List<Client> { new Client
        {
            ClientId="client1",
            ClientSecrets={ new Secret("secret1".Sha256())},
            AllowedGrantTypes={GrantType.ClientCredentials},
            AllowedScopes={"ApiOne"},
            AllowOfflineAccess=true,
            
        },
        };
Run Code Online (Sandbox Code Playgroud)

c# asp.net-core identityserver4

3
推荐指数
1
解决办法
3715
查看次数

标签 统计

asp.net-core ×1

c# ×1

identityserver4 ×1