Skip to content
This repository was archived by the owner on Jun 12, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/oidcendpoint/cookie.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from cryptojwt.jwk.hmac import SYMKey
from cryptojwt.jwk.jwk import key_from_jwk_dict
from cryptojwt.jws.hmac import HMACSigner
from cryptojwt.key_bundle import init_key
from cryptojwt.key_bundle import init_key, import_jwk
from cryptojwt.utils import as_bytes
from cryptojwt.utils import as_unicode
from cryptojwt.utils import b64e
Expand Down Expand Up @@ -301,7 +301,10 @@ def __init__(
else:
self.sign_key = SYMKey(k=sign_key)
elif sign_jwk:
self.sign_key = init_key(**sign_jwk)
if isinstance(sign_jwk, dict):
self.sign_key = init_key(**sign_jwk)
else:
self.sign_key = import_jwk(sign_jwk)
else:
self.sign_key = None

Expand All @@ -313,7 +316,10 @@ def __init__(
else:
self.enc_key = SYMKey(k=enc_key)
elif enc_jwk:
self.enc_key = init_key(**enc_jwk)
if isinstance(enc_jwk, dict):
self.enc_key = init_key(**enc_jwk)
else:
self.enc_key = import_jwk(enc_jwk)
else:
self.enc_key = None

Expand Down
12 changes: 3 additions & 9 deletions src/oidcendpoint/oidc/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,8 @@ def do_verified_logout(self, sid, client_id, alla=False, **kwargs):
else:
_res = self.logout_from_client(sid=sid, client_id=client_id)

try:
bcl = _res["blu"]
except KeyError:
pass
else:
bcl = _res.get("blu")
if bcl:
# take care of Back channel logout first
for _cid, spec in bcl.items():
_url, sjwt = spec
Expand All @@ -404,10 +401,7 @@ def do_verified_logout(self, sid, client_id, alla=False, **kwargs):
elif res.status_code >= 400:
logger.info("failed to logout from {}".format(_cid))

try:
return _res["flu"].values()
except KeyError:
return []
return _res["flu"].values() if _res.get("fluu") else []

def kill_cookies(self):
_ec = self.endpoint_context
Expand Down