Skip to content

Commit 474bd18

Browse files
committed
Had problems with logout. Now, fixed.
1 parent d2ef983 commit 474bd18

File tree

7 files changed

+34
-5
lines changed

7 files changed

+34
-5
lines changed

example/flask_rp/conf.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,32 @@
301301
"post_logout_redirect_uri": "https://{domain}:{port}/session_logout/bobcat",
302302
"frontchannel_logout_uri": "https://{domain}:{port}/fc_logout/bobcat",
303303
"frontchannel_logout_session_required": true
304+
},
305+
"local": {
306+
"issuer": "https://127.0.0.1:5000/",
307+
"client_preferences": {
308+
"application_name": "rphandler",
309+
"application_type": "web",
310+
"contacts": [
311+
312+
],
313+
"response_types": [
314+
"code"
315+
],
316+
"scope": [
317+
"openid",
318+
"profile",
319+
"email",
320+
"address",
321+
"phone"
322+
]
323+
},
324+
"redirect_uris": [
325+
"https://{domain}:{port}/authz_cb/local"
326+
],
327+
"post_logout_redirect_uri": "https://{domain}:{port}/session_logout/local",
328+
"frontchannel_logout_uri": "https://{domain}:{port}/fc_logout/local",
329+
"frontchannel_logout_session_required": true
304330
}
305331
},
306332
"webserver": {

example/flask_rp/views.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ def session_change():
233233
# post_logout_redirect_uri
234234
@oidc_rp_views.route('/session_logout/<op_identifier>')
235235
def session_logout(op_identifier):
236-
op_identifier = get_op_identifier_by_cb_uri(request.url)
237236
_rp = get_rp(op_identifier)
238237
logger.debug('post_logout')
239238
return "Post logout from {}".format(_rp.client_get("service_context").issuer)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77

88
[metadata]
99
name = "idpyoidc"
10-
version = "1.0.5"
10+
version = "1.0.6"
1111
author = "Roland Hedberg"
1212
author_email = "[email protected]"
1313
description = "Everything OAuth2 and OIDC"

src/idpyoidc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = "Roland Hedberg"
2-
__version__ = "1.0.5"
2+
__version__ = "1.0.6"
33

44
import os
55
from typing import Dict

src/idpyoidc/server/client_authn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ def verify_client(
486486
if not _method.is_usable(request=request, authorization_token=authorization_token):
487487
continue
488488
try:
489+
logger.info(f"Verifying client authentication using {_method.tag}")
489490
auth_info = _method.verify(
490491
request=request,
491492
authorization_token=authorization_token,

src/idpyoidc/server/oauth2/authorization.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ def verify_uri(
129129
if client_info is None:
130130
raise KeyError("No such client")
131131

132-
redirect_uris = client_info.get(f"{uri_type}s")
132+
if uri_type == "redirect_uri":
133+
redirect_uris = client_info.get(f"{uri_type}s")
134+
else:
135+
redirect_uris = client_info.get(f"{uri_type}")
133136

134137
if redirect_uris is None:
135138
raise RedirectURIError(f"No registered {uri_type} for {_cid}")

src/idpyoidc/server/oidc/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def parse_request(self, request, http_info=None, **kwargs):
361361

362362
# Verify that the client is allowed to do this
363363
auth_info = self.client_authentication(request, http_info, **kwargs)
364-
if not auth_info:
364+
if not auth_info or auth_info["method"] == "none":
365365
pass
366366
elif isinstance(auth_info, ResponseMessage):
367367
return auth_info

0 commit comments

Comments
 (0)