错误:invalid_scope - IdentityServer Flow.ClientCredential

时间:2017-03-13 15:36:31

标签: oauth-2.0 access-token identityserver3 openid-connect

我在IdentityServer3中有一个客户端

new Client
{
    ClientName = "Client Credentials Flow Client",
    Enabled = true,
    ClientId = "clientcredentials.reference",
    Flow = Flows.ClientCredentials,

    ClientSecrets = new List<Secret>
    {
        new Secret("secret".Sha256()),
    },

    AllowedScopes = new List<string>()
    {
        "read",
        "write"
    }
}

我在我的本地IIS中托管了令牌服务,我尝试使用Postman ping令牌,但是它给出了错误{"error":"invalid_scope"}

Host URL: 
    https://localhost:5775/core/connect/token
Header: 
    Content-Type:application/x-www-form-urlencoded
Body:
    grant_type=client_credentials
    &cliend_id=clientcredentials.reference
    &client_secret=secret

enter image description here

  

注意:我使用纯IdentityServer3包而不是Thinktecture

1 个答案:

答案 0 :(得分:0)

检查范围声明中的范围“read”和“write”

$scope.filteredItems

我认为它错过了......检查一次......