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, vault_url, credentials, config=None, **kwargs):
self._secrets = SecretClient(vault_url, credentials, config=config, **kwargs)
self._keys = KeyClient(vault_url, credentials, config=config, **kwargs)
def __init__(self, vault_url, credentials, config=None, **kwargs):
if not credentials:
raise ValueError('credentials')
if not vault_url:
raise ValueError('vault_url')
self._vault_url = vault_url
config = config or SecretClient.create_config(**kwargs)
transport = RequestsTransport(config.connection)
policies = [
config.user_agent,
config.headers,
_BearerTokenCredentialPolicy(credentials),
config.redirect,
config.retry,
config.logging,
]
self._pipeline = Pipeline(transport, policies=policies)