wso2没有在响应中返回refresh_token

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

以下是令牌请求。

    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

oauth-2.0 wso2 wso2-am refresh-token
1个回答
2
投票

在客户端凭据授予类型中,不包括刷新令牌。它在规范[1]中提到如下。

刷新令牌不应该包括在内。

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

[1] https://tools.ietf.org/html/rfc6749#section-4.4.3

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