fog/fog — pull request #3266 by amhuber (2014-11-13 01:53:07+00:00)
Title: Updating authentication functions to prevent sending expired token.

When the Keystone token expires the existing OpenStack code sends in the expired token along with the re-authentication request. Unfortunately, newer versions of Keystone error out with a "token not found" error when sending an expired token as a parameter, and logically it makes no sense to do so.

This code change will send nil instead of the expired token only in the case where we are re-authenticating and a new token will be retrieved and all calls will carry on as before. The option to initially authenticate with a valid token still works with no changes.