WSO2 API Manager (1.9.0) - Set Expire Date/Validity Time Via cURL -
when using wso2 via store possible set validity time, access token expire time can increased/decreased.
is possible set validity time via curl when generating new token?
e.g. normal token generation command:
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"}
possible token generation command setting validity time:
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"}
what correct command use setting this? reason this, because users of api manager able set expire date via java api client offer.
this not supported out of box. can implement writing custom oauth grant type. please refer [1] more details on how write custom oauth grant type.
[1] https://docs.wso2.com/display/is500/writing+a+custom+oauth+2.0+grant+type
Comments
Post a Comment