-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Profile] az login: Support --claims-challenge in auth code flow
#31778
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -152,7 +152,7 @@ def login(self, | |
| allow_no_subscriptions=False, | ||
| use_cert_sn_issuer=None, | ||
| show_progress=False, | ||
| **kwargs): | ||
| claims_challenge=None): | ||
| """ | ||
| For service principal, `password` is a dict returned by ServicePrincipalAuth.build_credential | ||
| """ | ||
|
|
@@ -172,12 +172,12 @@ def login(self, | |
| use_device_code = True | ||
|
|
||
| if use_device_code: | ||
| user_identity = identity.login_with_device_code(scopes=scopes, **kwargs) | ||
| user_identity = identity.login_with_device_code(scopes=scopes) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If This has been reported to MSAL:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shall we show a warning telling customers that
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a temporary bug in MSAL's device code implementation. I prefer not to complicate things as the bug will be fixed eventually. |
||
| else: | ||
| user_identity = identity.login_with_auth_code(scopes=scopes, **kwargs) | ||
| user_identity = identity.login_with_auth_code(scopes=scopes, claims_challenge=claims_challenge) | ||
| else: | ||
| if not is_service_principal: | ||
| user_identity = identity.login_with_username_password(username, password, scopes=scopes, **kwargs) | ||
| user_identity = identity.login_with_username_password(username, password, scopes=scopes) | ||
| else: | ||
| identity.login_with_service_principal(username, password, scopes=scopes) | ||
|
|
||
|
|
||
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.
This PR removes lots of
kwargs. I just want to confirm thatkwargsis never used and always empty, right?Uh oh!
There was an error while loading. Please reload this page.
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.
No. It is not used by any means. See the explanation in the PR description #31778 (comment).