-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Enable SSO on Windows #7006
Merged
Merged
Enable SSO on Windows #7006
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b043d36
AuthnClient takes a cache kwarg
chlowell 28305ac
trust MSAL's cache uses 'target' as advertised
chlowell cd100b1
add msal_extensions dependency
chlowell 4665055
SharedTokenCacheCredential
chlowell 86e8025
shorten timeouts in tests
chlowell 959839b
update documentation
chlowell f06dc09
reword DefaultAzureCredential docstring
chlowell 8885b09
don't write to shared cache
chlowell 5d3eabe
require a username
chlowell a0e0924
fix unrelated type hint
chlowell 570a42c
update changelog
chlowell a4125a9
readme tweak
chlowell 37f27e6
push release out
chlowell f172eeb
update version
chlowell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
sdk/identity/azure-identity/azure/identity/aio/_internal/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# ------------------------------------ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
# ------------------------------------ | ||
from .exception_wrapper import wrap_exceptions | ||
|
||
__all__ = ["wrap_exceptions"] |
24 changes: 24 additions & 0 deletions
24
sdk/identity/azure-identity/azure/identity/aio/_internal/exception_wrapper.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# ------------------------------------ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
# ------------------------------------ | ||
import functools | ||
|
||
from azure.core.exceptions import ClientAuthenticationError | ||
|
||
|
||
def wrap_exceptions(fn): | ||
"""Prevents leaking exceptions defined outside azure-core by raising ClientAuthenticationError from them.""" | ||
|
||
@functools.wraps(fn) | ||
async def wrapper(*args, **kwargs): | ||
try: | ||
result = await fn(*args, **kwargs) | ||
return result | ||
except ClientAuthenticationError: | ||
raise | ||
except Exception as ex: # pylint:disable=broad-except | ||
auth_error = ClientAuthenticationError(message="Authentication failed: {}".format(ex)) | ||
raise auth_error from ex | ||
|
||
return wrapper |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
FYI I made clientId a required parameter in the ctor for .NET and just use this when I construct it in the DefaultAzureCredential