【发布时间】:2023-02-12 01:27:11
【问题描述】:
基于我们的网关角色,应用程序必须通过以下 Curl 对自己进行身份验证
curl --location --request POST 'https://localhost:9443/oauth2/token' \
--header 'Authorization: Basic BASIC-TOKEN' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: cookiesession1=678B2889RTUVWXYZABCDEFGHIJKLE170' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username=USERNAME' \
--data-urlencode 'password=PASSWORD'
问题是,每次我调用 https://localhost:9443/oauth2/token 时,系统都会提供一个新的访问令牌。之前的访问令牌也将过期。
即使我使用 REFRESH-TOKEN grand-type 调用 https://localhost:9443/oauth2/token,系统也会再次为我提供新的访问令牌。
我无法理解 REFRESH-TOKEN 和 PASSWORD grand-type 之间的区别。为什么这两个过程都使可用的访问令牌过期并生成一个新的访问令牌?
我如何调用 https://localhost:9443/oauth2/token 并获取可用的访问令牌而不是生成新的访问令牌?
【问题讨论】:
标签: wso2 wso2-api-manager wso2-identity-server