Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ def auth_callback(server, resource, scope, scheme):
self.auth = KeyVaultAuthBase(authorization_callback)
self._callback = authorization_callback

def signed_session(self):
session = requests.Session()
def signed_session(self, session=None):
session = session or super(KeyVaultAuthentication, self).signed_session()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you user super here, you need to restore the init call in the init (which I see is commented). Most simple here will be:

session = session or requests.Session()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or change the base class to simply Authentication, since its init isn't doing anything (not like OAuthTokenAuthentication)

session.auth = self.auth
return session

Expand Down
4 changes: 2 additions & 2 deletions azure-keyvault/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
long_description=readme + '\n\n' + history,
license='MIT License',
author='Microsoft Corporation',
author_email='ptvshelp@microsoft.com',
author_email='azurekeyvault@microsoft.com',
url='https://github.com/Azure/azure-sdk-for-python',
classifiers=[
'Development Status :: 4 - Beta',
Expand All @@ -80,7 +80,7 @@
install_requires=[
'msrestazure>=0.4.15',
'msrest>=0.4.17',
'azure-common~=1.1.5',
'azure-common~=1.1',
'cryptography>=2.1.4',
'requests>=2.18.4'
],
Expand Down