Skip to content
This repository was archived by the owner on Jan 10, 2019. It is now read-only.

Commit 93409b3

Browse files
authored
Change consent request to POST
Requesting consent for large attribute/value sets fails with a GET request too big (4K) error. This PR needs companion fix in CMservice its-dirg/CMservice#9
1 parent 685dc5d commit 93409b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/satosa/micro_services/consent.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,9 @@ def _consent_registration(self, consent_args):
176176
:return: Ticket received from the consent service
177177
"""
178178
jws = JWS(json.dumps(consent_args), alg=self.signing_key.alg).sign_compact([self.signing_key])
179-
request = "{}/creq/{}".format(self.api_url, jws)
180-
res = requests.get(request)
179+
payload = dict(jwt=jws)
180+
request = "{}/creq/_".format(self.api_url)
181+
res = requests.post(request, data=payload)
181182

182183
if res.status_code != 200:
183184
raise UnexpectedResponseError("Consent service error: %s %s", res.status_code, res.text)

0 commit comments

Comments
 (0)