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

Adds more robust checking of the status code during compute engine auth. #25

Merged
merged 3 commits into from
Apr 23, 2015

Conversation

tbetbetbe
Copy link
Contributor

Currently the implementation does not verify that a 200 response is received
before attempting to parse the JSON response.

This PR updates the behaviour to fail with an authorization error, similar to
how other auth library implementations.

Fixes #23

Currently the implementation does not verify that a 200 response is received
before attempting to parse the JSON response.

This PR updates the behaviour to fail with an authorization error, similar to
how other auth library implementations.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 99.26% when pulling 98816f7 on tbetbetbe:ruby-auth-check-404-on-compute into 2924980 on google:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 99.26% when pulling 98816f7 on tbetbetbe:ruby-auth-check-404-on-compute into 2924980 on google:master.

stubs.verify_stubbed_calls
end

it 'should fail if metadata the request returns an unexpected codes' do

This comment was marked as spam.

This comment was marked as spam.

@sqrrrl
Copy link
Contributor

sqrrrl commented Apr 23, 2015

I take it the end result is still the same -- an error (albeit a more informative one :) will be raised if --no-scope is used?

@tbetbetbe
Copy link
Contributor Author

That's correct. That's consistent with how java and python handle it.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 99.27% when pulling fe1c46c on tbetbetbe:ruby-auth-check-404-on-compute into 2924980 on google:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 99.27% when pulling fe1c46c on tbetbetbe:ruby-auth-check-404-on-compute into 2924980 on google:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 99.27% when pulling fe1c46c on tbetbetbe:ruby-auth-check-404-on-compute into 2924980 on google:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 99.27% when pulling fe1c46c on tbetbetbe:ruby-auth-check-404-on-compute into 2924980 on google:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 99.27% when pulling fe1c46c on tbetbetbe:ruby-auth-check-404-on-compute into 2924980 on google:master.

sqrrrl added a commit that referenced this pull request Apr 23, 2015
Adds more robust checking of the status code during compute engine auth.
@sqrrrl sqrrrl merged commit b5ff47f into googleapis:master Apr 23, 2015
@tbetbetbe tbetbetbe deleted the ruby-auth-check-404-on-compute branch August 6, 2015 19:20
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.

GCE error when --no-scopes used
3 participants