客户端凭证不受支持_grant_type

问题描述 投票:0回答:1

我正在创建 FastApi + KeyCloak 应用程序。创建领域、客户端和用户

客户端配置 enter image description here

我的用户配置 enter image description here

我可以通过此请求获取令牌

enter image description here

但是对于 grant_type

client-credentials
我有一个错误:

{
    "error": "unsupported_grant_type",
    "error_description": "Unsupported grant_type"
}

“密码”和“客户端凭据”有什么区别?以及如何支持客户凭证?

keycloak keycloak-rest-api
1个回答
0
投票

您需要使用正确的“client_credentials”(而不是“client-credentials”)授予类型。

所需设置

enter image description here

结果

enter image description here

client_credentials 和密码的区别

身份验证流程中 grant_type=client_credentials 和 grant_type=password 之间的区别?

© www.soinside.com 2019 - 2024. All rights reserved.