Skip to content
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

return token stored message on login #932

Merged
merged 1 commit into from
Aug 18, 2016
Merged

Conversation

vjeffrey
Copy link

at the moment, on master, we respond with 'successfully authenticated' even when there's an obviously wrong token, so this is just a small change to send back the actual message instead:
screen shot 2016-08-17 at 8 12 49 pm

elsif !options['user'].nil? && !options['token'].nil?
# access token
success, msg = store_access_token(url, options['user'], options['token'], options['insecure'])
msg = store_access_token(url, options['user'], options['token'], options['insecure'])
Copy link
Contributor

@stevendanna stevendanna Aug 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

store_access_token returns an array, so now msg will be an array (https://github.com/chef/inspec/pull/932/files#diff-e2fd7d8d44ceb659a9c3a3a7984c53a4R237), which will cause the print statement below to print both items:

screen shot 2016-08-18 at 9 31 02 am

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, oops, sorry. i took that out cause of a lint complaint, I should have just left it in with a leading underscore....late night changes :) I'll switch it up

@chris-rock chris-rock merged commit d13a8ff into master Aug 18, 2016
@chris-rock chris-rock deleted the vj/update-token-msg branch August 18, 2016 16:12
@chris-rock chris-rock modified the milestone: 0.31.0 Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants