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

dcos-4134 integrate with acs AuthN flow #423

Merged
merged 1 commit into from
Jan 27, 2016
Merged

dcos-4134 integrate with acs AuthN flow #423

merged 1 commit into from
Jan 27, 2016

Conversation

tamarrow-zz
Copy link
Contributor

No description provided.

# using private method here, so we don't retry on this request
# error here will be bubbled up to _request_with_auth
response = _request('post', url, json=creds)
if response.status_code == 200:
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if the status_code is not 200?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I get it. If the header is not set then the following call will get fail with a 400.

@tamarrow-zz
Copy link
Contributor Author

@jsancio updated with changes we talked about today


token = None
if response.status_code == 200:
token = response.json()['token']
Copy link
Contributor

Choose a reason for hiding this comment

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

Okay. Or token = response.json().get('token') if response.status_code == 200 else None if we want functional code.

@jsancio
Copy link
Contributor

jsancio commented Jan 27, 2016

Looks great! :shipit:

tamarrow-zz pushed a commit that referenced this pull request Jan 27, 2016
dcos-4134 integrate with acs AuthN flow
@tamarrow-zz tamarrow-zz merged commit 76a31d4 into master Jan 27, 2016
@tamarrow-zz tamarrow-zz deleted the dcos-4134 branch January 27, 2016 21:02
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

2 participants