opened
sykesm
username_0
While working with the new plugin API, I removed my home-grown wrapper around the `oauth-token` command and replaced it with a call to thew new `AccessToken` method on the CLI connection. Unfortunately, the new method does not refresh the access token like the old method did and there is absolutely no documentation about why I would choose one over the other.

This behavior results in scenarios where end users must explicitly do something that causes their token to be refreshed before trying to use a plugin that relies on a valid access token. My assumption was that the new method existed to make it easier on users to acquire a token without having to scrape the token from the output and deal with all of the error cases. 

1. The documentation should clearly indicated wha the CLI plugin commands do, the expected environment, and the expected results.
2. The `AccessToken` method should ensure that it returns an access token that is not expired or it should return an error indicating a refresh is necessary.
plugin.CliConnection#AccessToken returns stale tokens
issue
closed
camelpunch
username_1
issue
created
camelpunch
username_1
Tokens are now refreshed automatically when the AccessToken plugin command is called. Ignore the commit above - the change was made after that PR was rejected.
comment