cloudfoundry/go-cfclient

cfclient error (CF-InvalidAuthToken|1000): Invalid Auth Token

jameshochadel opened this issue · 5 comments

I can make API calls with the client when I've recently run a command with the cf CLI, because the CLI has used the refresh token to get a new access token. However, if I let the access token expire, I get the error in the title.

Versions:

I looked at the open issues and noticed #345, but I don't think the issue is the same. The refresh token works as expected with the cf CLI, so I don't think it's invalid or expiring.

sneal commented

I checked the CloudController and it returns a 401 status code with this error. I wonder if something is catching the http status before the executor gets it and tries to reauth.

sneal commented

Are you using config.NewFromCFHomeDir()? That doesn't read the refresh token, only the access token.

sneal commented

Fixed in 33e600b

Awesome — thank you @sneal, and sorry I didn't get back to you. I appreciate you following up on it.