From 5f5975092d0500c3fa0117419657ee58e63e67d7 Mon Sep 17 00:00:00 2001 From: kevinhe2017 <34375985+kevinhe2017@users.noreply.github.com> Date: Wed, 9 May 2018 15:09:05 +0000 Subject: [PATCH 1/2] Update base.py Fix RTC client authentication failure issue. The OSLC core version should be specified as 2.0. --- rtcclient/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rtcclient/base.py b/rtcclient/base.py index 91e5ed2..6f863c5 100644 --- a/rtcclient/base.py +++ b/rtcclient/base.py @@ -12,6 +12,7 @@ class RTCBase(object): log = logging.getLogger("base.RTCBase") CONTENT_XML = "text/xml" +    OSLC_CORE_VERSION = "2.0" CONTENT_URL_ENCODED = "application/x-www-form-urlencoded" OSLC_CR_XML = "application/x-oslc-cm-change-request+xml" OSLC_CR_JSON = "application/x-oslc-cm-change-request+json" From b73d13b4ca93a077dbf0b9e5e90ea4f78ee84c10 Mon Sep 17 00:00:00 2001 From: kevinhe2017 <34375985+kevinhe2017@users.noreply.github.com> Date: Tue, 15 May 2018 19:27:54 +0000 Subject: [PATCH 2/2] Update client.py To fix client authentication issue with RTC 6.0.4 ccm server which has OSLC core version 2.0. The following line should be added to base.py to make it work: OSLC_CORE_VERSION = "2.0" --- rtcclient/client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rtcclient/client.py b/rtcclient/client.py index c3da7d8..f219b5c 100644 --- a/rtcclient/client.py +++ b/rtcclient/client.py @@ -83,6 +83,7 @@ def _get_headers(self): _allow_redirects = False _headers = {"Content-Type": self.CONTENT_XML} + _headers["OSLC-Core-Version"] = self.OSLC_CORE_VERSION resp = self.get(self.url + "/authenticated/identity", verify=False, headers=_headers,