Skip to content

Commit

Permalink
reword DefaultAzureCredential docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
chlowell committed Sep 7, 2019
1 parent 959839b commit f06dc09
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
17 changes: 8 additions & 9 deletions sdk/identity/azure-identity/azure/identity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ class DefaultAzureCredential(ChainedTokenCredential):
"""
A default credential capable of handling most Azure SDK authentication scenarios.
When environment variable configuration is present, it authenticates as a service principal using
:class:`azure.identity.EnvironmentCredential`.
When environment configuration is not present, it authenticates with a managed identity using
:class:`azure.identity.ManagedIdentityCredential`.
On Windows, when environment variable configuration and managed identity are unavailable, it finally
attempts to authenticate with a token from the cache shared by Microsoft applications using
:class:`azure.identity.SharedTokenCacheCredential`.
The identity it uses depends on the environment. When an access token is needed, it requests one using these
identities in turn, stopping when one provides a token:
1. A service principal configured by environment variables. See :class:`~azure.identity.EnvironmentCredential` for
more details.
2. An Azure managed identity. See :class:`~azure.identity.ManagedIdentityCredential` for more details.
3. On Windows only, the current user, using a token from the local cache shared by Microsoft applications. See
:class:`~azure.identity.SharedTokenCacheCredential` for more details.
"""

def __init__(self, **kwargs):
Expand Down
17 changes: 8 additions & 9 deletions sdk/identity/azure-identity/azure/identity/aio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ class DefaultAzureCredential(ChainedTokenCredential):
"""
A default credential capable of handling most Azure SDK authentication scenarios.
When environment variable configuration is present, it authenticates as a service principal using
:class:`azure.identity.EnvironmentCredential`.
When environment configuration is not present, it authenticates with a managed identity using
:class:`azure.identity.ManagedIdentityCredential`.
On Windows, when environment variable configuration and managed identity are unavailable, it finally
attempts to authenticate with a token from the cache shared by Microsoft applications using
:class:`azure.identity.SharedTokenCacheCredential`.
The identity it uses depends on the environment. When an access token is needed, it requests one using these
identities in turn, stopping when one provides a token:
1. A service principal configured by environment variables. See :class:`~azure.identity.aio.EnvironmentCredential`
for more details.
2. An Azure managed identity. See :class:`~azure.identity.aio.ManagedIdentityCredential` for more details.
3. On Windows only, the current user, using a token from the local cache shared by Microsoft applications. See
:class:`~azure.identity.aio.SharedTokenCacheCredential` for more details.
"""

def __init__(self, **kwargs):
Expand Down

0 comments on commit f06dc09

Please sign in to comment.