How to use the azure-keyvault.azure.keyvault.custom.key_vault_authentication.KeyVaultAuthentication function in azure-keyvault

To help you get started, we’ve selected a few azure-keyvault examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-python / azure-keyvault / azure / keyvault / custom / key_vault_client.py View on Github external
def __init__(self, credentials):
        """The key vault client performs cryptographic key operations and vault operations against the Key Vault service.

        :ivar config: Configuration for client.
        :vartype config: KeyVaultClientConfiguration

        :param credentials: Credentials needed for the client to connect to Azure.
        :type credentials: :mod:`A msrestazure Credentials
         object` or :mod:`A KeyVaultAuthentication
         object`
        """

        # if the supplied credentials instance is not derived from KeyVaultAuthBase but is an AAD credential type
        if not isinstance(credentials, KeyVaultAuthentication) and isinstance(credentials, BasicTokenAuthentication):

            # wrap the supplied credentials with a KeyVaultAuthentication instance. Use that for the credentials supplied to the base client
            credentials = KeyVaultAuthentication(credentials=credentials)

        super(CustomKeyVaultClient, self).__init__(credentials)
github Azure / azure-sdk-for-python / azure-keyvault / azure / keyvault / custom / key_vault_client.py View on Github external
"""The key vault client performs cryptographic key operations and vault operations against the Key Vault service.

        :ivar config: Configuration for client.
        :vartype config: KeyVaultClientConfiguration

        :param credentials: Credentials needed for the client to connect to Azure.
        :type credentials: :mod:`A msrestazure Credentials
         object` or :mod:`A KeyVaultAuthentication
         object`
        """

        # if the supplied credentials instance is not derived from KeyVaultAuthBase but is an AAD credential type
        if not isinstance(credentials, KeyVaultAuthentication) and isinstance(credentials, BasicTokenAuthentication):

            # wrap the supplied credentials with a KeyVaultAuthentication instance. Use that for the credentials supplied to the base client
            credentials = KeyVaultAuthentication(credentials=credentials)

        super(CustomKeyVaultClient, self).__init__(credentials)