首页 文章

WSO2 API Manager(1.9.0) - 通过cURL设置过期日期/有效期

提问于
浏览
0

当通过商店使用WSO2 AM时,可以设置有效时间,以便可以增加/减少访问令牌到期时间 .

生成新令牌时是否可以通过cURL设置有效时间?

例如 . 正常令牌生成命令:

curl -k -d "grant_type=client_credentials" -H "Authorization: Basic userToken, Content-Type: application/x-www-form-urlencoded" localhost:8243/token

{"scope":"am_application_scope default","token_type":"bearer","expires_in":1367,"access_token":"1234456677890"}

设置有效时间的可能令牌生成命令:

curl -k -d "grant_type=client_credentials" -d "validity_time=99999" -H "Authorization: Basic userToken, Content-Type: application/x-www-form-urlencoded" localhost:8243/token

{"scope":"am_application_scope default","token_type":"bearer","expires_in":99999,"access_token":"1234456677890"}

用于设置此命令的正确命令是什么?原因是因为我希望API Manager的用户能够通过我们提供的Java API客户端设置过期日期 .

1 回答

相关问题