-
Notifications
You must be signed in to change notification settings - Fork 119
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
Conversation
# 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: |
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.
What happens if the status_code
is not 200
?
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.
I think I get it. If the header is not set then the following call will get fail with a 400
.
dfd6b20
to
7539e6d
Compare
@jsancio updated with changes we talked about today |
7539e6d
to
36071ff
Compare
|
||
token = None | ||
if response.status_code == 200: | ||
token = response.json()['token'] |
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.
Okay. Or token = response.json().get('token') if response.status_code == 200 else None
if we want functional code.
Looks great! |
dcos-4134 integrate with acs AuthN flow
No description provided.