Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit c54bbac

Browse files
committed
Merge pull request #559 from rackspace/comment-about-reauth
comment about limiting the number of re-auth attempts
2 parents 231898e + 6e2ca00 commit c54bbac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

auth_options.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ type AuthOptions struct {
4242
// re-authenticate automatically if/when your token expires. If you set it to
4343
// false, it will not cache these settings, but re-authentication will not be
4444
// possible. This setting defaults to false.
45+
//
46+
// NOTE: The reauth function will try to re-authenticate endlessly if left unchecked.
47+
// The way to limit the number of attempts is to provide a custom HTTP client to the provider client
48+
// and provide a transport that implements the RoundTripper interface and stores the number of failed retries.
49+
// For an example of this, see here: https://github.com/rackspace/rack/blob/1.0.0/auth/clients.go#L311
4550
AllowReauth bool
4651

4752
// TokenID allows users to authenticate (possibly as another user) with an

0 commit comments

Comments
 (0)