-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add username and password login #418
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple questions.
clients/signin/signin.go
Outdated
}) | ||
res, err := client.SigninApi.PostSignin(ctx).ExecuteWithHttpInfo() | ||
if err != nil { | ||
return "", err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe if an error happens here, you could again print to the user that this is only supported for OSS, in case that clarifies their problem. What does the error look like when you try to make this request to cloud?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It simply 404s because cloud tries to do some redirect stuff that we don't follow. I can wrap this error with a suggestion to make sure its not running against cloud.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR adds the ability for a user to login to InfluxDB using a username and password rather than a token. A user can specify both the username and password to be saved and used for all requests. Or, a user can specify just the username and they will be prompted for the password each time.
Note: this feature is OSS only