Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
"""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)