Skip to content

Commit cc23f9b

Browse files
committed
Support verify, proxies and timeout behavior
1 parent 518711b commit cc23f9b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

msal/application.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ class ClientApplication(object):
5454
def __init__(
5555
self, client_id,
5656
client_credential=None, authority=None, validate_authority=True,
57-
token_cache=None):
57+
token_cache=None,
58+
verify=True, proxies=None, timeout=None):
5859
"""
5960
:param client_credential: It can be a string containing client secret,
6061
or an X509 certificate container in this form:
@@ -71,6 +72,9 @@ def __init__(
7172
validate_authority)
7273
# Here the self.authority is not the same type as authority in input
7374
self.token_cache = token_cache or TokenCache()
75+
self.verify = verify
76+
self.proxies = proxies
77+
self.timeout = timeout
7478
self.client = self._build_client(client_credential, self.authority)
7579

7680
def _build_client(self, client_credential, authority):
@@ -105,7 +109,7 @@ def _build_client(self, client_credential, authority):
105109
on_obtaining_tokens=self.token_cache.add,
106110
on_removing_rt=self.token_cache.remove_rt,
107111
on_updating_rt=self.token_cache.update_rt,
108-
)
112+
verify=self.verify, proxies=self.proxies, timeout=self.timeout)
109113

110114
def get_authorization_request_url(
111115
self,

0 commit comments

Comments
 (0)