Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Conversation

smarterclayton
Copy link
Contributor

Currently stored tokens are used if use_authorization_tokens is nil or false,
or if the user passes --rhlogin and --password. In both of these cases, the
token should be ignored.

Removed token context helper and replaced it with a helper method
"token_for_user" which is called in the commands as needed. Also,
RHC::Auth::Token is not used unless use_authorization_tokens is true or
--token is passed, AND a user/password isn't provided.

Currently stored tokens are used if use_authorization_tokens is nil or false, or if the user passes --rhlogin and --password.  In both of these cases, the token should be ignored.

Removed token context helper and replaced it with a helper method "token_for_user" which is called in the commands as needed.  Also, RHC::Auth::Token is not used unless use_authorization_tokens is true or --token is passed, AND a user/password isn't provided.
@@ -232,7 +232,7 @@ def self.fill_arguments(cmd, options, args_metadata, options_metadata, args)
Commander::Runner.instance.options.each do |opt|
if opt[:context]
arg = Commander::Runner.switch_to_sym(opt[:switches].last)
options[arg] ||= lambda{ cmd.send(opt[:context]) }
options.__hash__[arg] ||= lambda{ cmd.send(opt[:context]) }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

options[arg] evaluates the proc, so we need to avoid that by going direct to the source.

@jtharris
Copy link
Contributor

Reviewed, [merge]

@openshift-bot
Copy link

Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/merge_pull_requests/2204/) (Image: devenv_3017)

@openshift-bot
Copy link

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link

@openshift-bot
Copy link

Evaluated for online up to baa431b

@openshift-bot
Copy link

Origin Test Results: Waiting: Determining build queue position

@openshift-bot
Copy link

Evaluated for origin up to baa431b

@openshift-bot
Copy link

Origin Test Results: FAILURE (https://originci-openshift.rhcloud.com/job/test_pull_requests/711/)

openshift-bot pushed a commit that referenced this pull request Mar 29, 2013
…ion_tokens_not_strict_enough

Merged by openshift-bot
@openshift-bot openshift-bot merged commit df178c8 into openshift:master Mar 29, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants