Remove debugging infrastructure.
Bug was found, and things seems to work. In summary, a comparison for
err != nil was performed where I intended err == nil instead.
diff --git a/authenticate.go b/authenticate.go
index f98c4cc..07a5611 100644
--- a/authenticate.go
+++ b/authenticate.go
@@ -2,7 +2,6 @@
import (
"github.com/racker/perigee"
- "fmt"
)
// AuthOptions lets anyone calling Authenticate() supply the required access credentials.
@@ -159,11 +158,9 @@
var other *Access
var err error
- fmt.Printf("**\n %#v\n", a.options)
if a.options.AllowReauth {
other, err = a.context.papersPlease(a.provider, a.options)
- if err != nil {
- fmt.Println("NEW NEW: ", other.AuthToken())
+ if err == nil {
*a = *other
}
}