Skip to content

Commit

Permalink
Fixed examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohe committed Jan 19, 2023
1 parent 6bc99a6 commit 7ad92c2
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 355 deletions.
2 changes: 1 addition & 1 deletion example/flask_op/private/cookie_jwks.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"keys": [{"kty": "oct", "use": "enc", "kid": "enc", "k": "Nlrhp24ih_-bYrpOHfpWnfSDlCrFsfKl"}, {"kty": "oct", "use": "sig", "kid": "sig", "k": "Wfiff4_r1z-8QUbZ2GFayeVhdw_jGjHz"}]}
{"keys": [{"kty": "oct", "use": "enc", "kid": "enc", "k": "gVdGvOn9TFG38gzqs2uO-pQB40qxJbfm"}, {"kty": "oct", "use": "sig", "kid": "sig", "k": "HlW_dFC6aquKPZ6zGtq2dZEBcntP9uHd"}]}
2 changes: 1 addition & 1 deletion example/flask_op/static/jwks.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"keys": [{"kty": "RSA", "use": "sig", "kid": "bXNmZXROQ3N2dDI2SWY5VlNWTG5yOXZqYlpLenVsalhwUWR5RW9BMHNCaw", "e": "AQAB", "n": "uGVI-b6qr-OTc2knp7bpmDtiCQoWFXZ8mUV-SX0rCMtcc_IRmc_J7AfNEfnYk3dv0cKQK_Dgv3vicoeuf4KQ9ZZY-xI3bnRl9_HnhRpz_cJScDirkNKlsv8aQuYBO_gIiHp8B32YC0nx3BUQV5I6QGEiyG-lZT9PmXsUO1uKPPhny_vtQ6cUpvtuLySBu2ZYpaTDQqCv5Y6EKC49NYWhBB4B6f6TNKCoQTaxA8ZoM3lh7kFbu5DPEXKFAtuNiOtUNP7Ei9KfBtyBYSaZQBY8VkwAm1yKCA2sfv1mBwx0dT53MPJlNkoltf89mv1NM2OJPQAgGE6ygwGS2fyBLAn_bQ"}, {"kty": "EC", "use": "sig", "kid": "U0pLNmFBRE4waDYyZG9ZdjNPb2pTZXAwZzdrbmpZdG0ya3lpaFJwZU9ncw", "crv": "P-256", "x": "DYUyBfiD53SEtUuKLjFCFpIkqyhbmBppAMjOat9qiY0", "y": "-SUSvVeOv7EA84qHLLEkDP24iZree-fomICuA4baeeA"}]}
{"keys": [{"kty": "RSA", "use": "sig", "kid": "bXNmZXROQ3N2dDI2SWY5VlNWTG5yOXZqYlpLenVsalhwUWR5RW9BMHNCaw", "n": "uGVI-b6qr-OTc2knp7bpmDtiCQoWFXZ8mUV-SX0rCMtcc_IRmc_J7AfNEfnYk3dv0cKQK_Dgv3vicoeuf4KQ9ZZY-xI3bnRl9_HnhRpz_cJScDirkNKlsv8aQuYBO_gIiHp8B32YC0nx3BUQV5I6QGEiyG-lZT9PmXsUO1uKPPhny_vtQ6cUpvtuLySBu2ZYpaTDQqCv5Y6EKC49NYWhBB4B6f6TNKCoQTaxA8ZoM3lh7kFbu5DPEXKFAtuNiOtUNP7Ei9KfBtyBYSaZQBY8VkwAm1yKCA2sfv1mBwx0dT53MPJlNkoltf89mv1NM2OJPQAgGE6ygwGS2fyBLAn_bQ", "e": "AQAB"}, {"kty": "EC", "use": "sig", "kid": "U0pLNmFBRE4waDYyZG9ZdjNPb2pTZXAwZzdrbmpZdG0ya3lpaFJwZU9ncw", "crv": "P-256", "x": "DYUyBfiD53SEtUuKLjFCFpIkqyhbmBppAMjOat9qiY0", "y": "-SUSvVeOv7EA84qHLLEkDP24iZree-fomICuA4baeeA"}]}
339 changes: 0 additions & 339 deletions example/flask_rp/conf.json

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion example/flask_rp/run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

./wsgi.py conf.json
./wsgi.py config.json
3 changes: 1 addition & 2 deletions example/flask_rp/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,8 @@ def finalize(op_identifier, request_args):
def get_op_identifier_by_cb_uri(url: str):
uri = splitquery(url)[0]
for k, v in current_app.rph.issuer2rp.items():
_cntx = v.get_service_context()
for endpoint in v.get_callback_uris():
_endps = _cntx.get_metadata(endpoint)
_endps = v.get_metadata_value(endpoint)
if _endps is None:
continue
elif isinstance(_endps,str):
Expand Down
2 changes: 1 addition & 1 deletion src/idpyoidc/client/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __init__(

_del_key = []
for attr, val in self.conf.items():
if attr in ["issuer", "base_url", "key_conf"]:
if attr in ["issuer", "key_conf"]:
setattr(self, attr, val)
_del_key.append(attr)

Expand Down
11 changes: 6 additions & 5 deletions src/idpyoidc/client/oidc/end_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,12 @@ def get_id_token_hint(self, request_args=None, **kwargs):

def add_post_logout_redirect_uri(self, request_args=None, **kwargs):
if "post_logout_redirect_uri" not in request_args:
_uri = self.metadata["post_logout_redirect_uris"]
if isinstance(_uri, str):
request_args["post_logout_redirect_uri"] = _uri
else: # assume list
request_args["post_logout_redirect_uri"] = _uri[0]
_uri = self.metadata.get("post_logout_redirect_uris", '')
if _uri:
if isinstance(_uri, str):
request_args["post_logout_redirect_uri"] = _uri
else: # assume list
request_args["post_logout_redirect_uri"] = _uri[0]

return request_args, {}

Expand Down
Loading

0 comments on commit 7ad92c2

Please sign in to comment.