summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalim Fadhley <sal@stodge.org>2014-08-30 00:48:32 +0100
committerSalim Fadhley <sal@stodge.org>2014-08-30 00:48:32 +0100
commita7fca527ab2dfb2b8b7841b246289821303ce15b (patch)
tree2767ce6ebc43fddba7e6c616901b64436701c776
parent59207ee8d78616e689589c06d8cfc8e06ee186eb (diff)
parent73888ae418152be5ed2b2a21a50331beff089b82 (diff)
downloadpython-jenkinsapi-a7fca527ab2dfb2b8b7841b246289821303ce15b.tar.gz
python-jenkinsapi-a7fca527ab2dfb2b8b7841b246289821303ce15b.tar.bz2
python-jenkinsapi-a7fca527ab2dfb2b8b7841b246289821303ce15b.zip
Merge pull request #305 from aoen/dd_fix_kerb_auth
Fix Kerberos Request Module
-rw-r--r--jenkinsapi/utils/krb_requester.py26
1 files changed, 11 insertions, 15 deletions
diff --git a/jenkinsapi/utils/krb_requester.py b/jenkinsapi/utils/krb_requester.py
index a9c4e7a..17319a4 100644
--- a/jenkinsapi/utils/krb_requester.py
+++ b/jenkinsapi/utils/krb_requester.py
@@ -14,7 +14,8 @@ class KrbRequester(Requester):
def __init__(self, ssl_verify=None, baseurl=None, mutual_auth=OPTIONAL):
"""
- :param ssl_verify: flag indicating if server certificate in HTTPS requests should be verified
+ :param ssl_verify: flag indicating if server certificate in HTTPS requests should be
+ verified
:param baseurl: Jenkins' base URL
:param mutual_auth: type of mutual authentication, use one of REQUIRED, OPTIONAL or DISABLED
from requests_kerberos package
@@ -27,17 +28,12 @@ class KrbRequester(Requester):
super(KrbRequester, self).__init__(**args)
self.mutual_auth = mutual_auth
- def get_request_dict(self, url, params, data, headers):
- req_dict = Requester(
- self,
- url=url,
- params=params,
- data=data,
- headers=headers
- )
- if self.mutual_auth:
- auth = HTTPKerberosAuth(self.mutual_auth)
- else:
- auth = HTTPKerberosAuth()
- req_dict['auth'] = auth
- return req_dict
+ def get_request_dict(self, params=None, data=None, files=None, headers=None):
+ req_dict = super(KrbRequester, self).get_request_dict(params=params, data=data, files=files,
+ headers=headers)
+ if self.mutual_auth:
+ auth = HTTPKerberosAuth(self.mutual_auth)
+ else:
+ auth = HTTPKerberosAuth()
+ req_dict['auth'] = auth
+ return req_dict