wso2 没有在响应中返回 refresh_token

wso2 not returning refresh_token in the response

下面是令牌请求。

    curl -X POST \
  https://172.17.0.1:9443/oauth2/token \
  -H 'Authorization: Basic dXF0c0hnVUp2dnU5X1BDdVEyTjI5dDRqRjA0YTozb1IzYllmN2gxOVBMYmZiTElnR25xNllkQjBh' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Postman-Token: f7ffb7f5-c78d-4931-81e1-a3266da68578' \
  -d grant_type=client_credentials

我没有在响应中获得刷新令牌

{
    "access_token": "867ab2c1-5afa-39f3-a897-5ff4b8a3232b",
    "scope": "am_application_scope default",
    "token_type": "Bearer",
    "expires_in": 305
}

Wso2am 版本 2.1.0

在client-credentials授权类型中,不包括刷新令牌。它在规范[1]中提到如下。

不应包含刷新令牌。

如果您需要刷新令牌,您应该使用不同的授权类型。

[1] https://www.rfc-editor.org/rfc/rfc6749#section-4.4.3