sassoftware / pyviyatools

Python command-line tools that call the SAS Viya REST APIs - for SAS administrators.
Apache License 2.0
38 stars 31 forks source link

Dev/refreshtoken #123

Closed gerrynelson63 closed 1 year ago

gerrynelson63 commented 1 year ago

Use the CLI refresh token when the access token has expired.

For each request made, if the Viya access token is expired, the code will now get a new access token using the refresh token. In recent releases of Viya the access token only lasts for 1 hour. The refresh token is good for 90 days.

Also in this merge fixed a bug created by a previous update to getfolderid function and tool. Unfortunately some other code depends on the full result dictionary being at index 3 of the returned result list.