【发布时间】:2016-08-29 07:09:56
【问题描述】:
我正在使用 Wso2 API Manager 1.9 和 Wso2 IS 5。
我正在通过
生成令牌curl -k -d "grant_type=password&username=username@domain.com&password=password" -H "Authorization: Basic ZmtvZTdJNUVuME8yTVVQMnpHOERqV05SVXU
wYTpmM0cyNmlrbVpVTHlhUFplTHlaRTZYOHJLSHNh, Content-Type: application/x-www-form-urlencoded" https://10.234.31.152:8245/token
回应是
{
"scope":"default",
"token_type":"bearer",
"expires_in":3600,
"refresh_token":"42a354167211de45aca1b2ebacc27d24",
"access_token":"266c3aabaad48a587a6b5145d4f5252"
}
这里令牌的有效期是 3600 秒。 (可以配置。)
我的要求是:
用户主动访问 API 时令牌不应过期,
如果用户空闲 3600 秒,令牌应该过期
【问题讨论】: