Skip to content

Commit

Permalink
Merge pull request #712 from OpenIDC/content_type
Browse files Browse the repository at this point in the history
Set Content-Type for backchannel logout POSTs
  • Loading branch information
tpazderka authored Nov 13, 2019
2 parents f67df35 + 2352bed commit ddeb42d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ The format is based on the [KeepAChangeLog] project.

### Fixed
- [#711] Deal with no post_logout_redirect_uri
- [#712] Set Content-Type on BackChannel logout POST.

[#711]: https://github.com/OpenIDC/pyoidc/pull/711
[#712]: https://github.com/OpenIDC/pyoidc/pull/712

## 1.1.1 [2019-11-04]

Expand Down
6 changes: 5 additions & 1 deletion src/oic/oic/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2282,13 +2282,17 @@ def do_verified_logout(
# take care of Back channel logout first
if logout_spec["back_channel"]:
failed = []
headers = {"Content-Type": "application/x-www-form-urlencoded"}
for _cid, spec in logout_spec["back_channel"].items():
_url, sjwt = spec
logger.info("logging out from {} at {}".format(_cid, _url))

try:
res = self.httpc.http_request(
_url, "POST", data="logout_token={}".format(sjwt)
_url,
"POST",
data="logout_token={}".format(sjwt),
headers=headers,
)
except Exception as err:
# Can't be more specific because I don't know which http client are used
Expand Down

0 comments on commit ddeb42d

Please sign in to comment.