AzureIdentityCredentialAdapter Class
Adapt any azure-identity credential to work with SDK that needs azure.common.credentials or msrestazure. Default resource is ARM (syntax of endpoint v2) :param credential: Any azure-identity credential (DefaultAzureCredential by default) :param str resource_id: The scope to use to get the token (default ARM)
- Inheritance
-
msrest.authentication.BasicTokenAuthenticationAzureIdentityCredentialAdapter
Constructor
AzureIdentityCredentialAdapter(credential, resource_id='https://iothubs.azure.net/.default', **kwargs)
Parameters
Name | Description |
---|---|
credential
Required
|
|
resource_id
|
Default value: https://iothubs.azure.net/.default
|
Methods
set_token |
Ask the azure-core BearerTokenCredentialPolicy policy to get a token. Using the policy gives us for free the caching system of azure-core. We could make this code simpler by using private method, but by definition I can't assure they will be there forever, so mocking a fake call to the policy to extract the token, using 100% public API. |
signed_session |
set_token
Ask the azure-core BearerTokenCredentialPolicy policy to get a token. Using the policy gives us for free the caching system of azure-core. We could make this code simpler by using private method, but by definition I can't assure they will be there forever, so mocking a fake call to the policy to extract the token, using 100% public API.
set_token()
signed_session
signed_session(session=None)
Parameters
Name | Description |
---|---|
session
|
Default value: None
|
Attributes
header
header = 'Authorization'
Azure SDK for Python