This repository was archived by the owner on Jun 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 11import os
2+ import re
23
34from cryptojwt import KeyJar
45from cryptojwt .key_jar import init_key_jar
@@ -23,16 +24,15 @@ def init_oidc_rp_handler(app):
2324 if rp_keys_conf :
2425 _kj = init_key_jar (** rp_keys_conf )
2526 _path = rp_keys_conf ['public_path' ]
26- if _path .startswith ('./' ):
27- _path = _path [2 :]
28- elif _path .startswith ('/' ):
29- _path = _path [1 :]
27+ # replaces ./ and / from the begin of the string
28+ _path = re .sub ('^(.)/' , '' , _path )
3029 else :
3130 _kj = KeyJar ()
3231 _path = ''
3332 _kj .verify_ssl = verify_ssl
3433
35- rph = RPHandler (base_url = app .config .get ('BASEURL' ), hash_seed = hash_seed ,
34+ rph = RPHandler (base_url = app .config .get ('BASEURL' ),
35+ hash_seed = hash_seed ,
3636 keyjar = _kj , jwks_path = _path ,
3737 client_configs = app .config .get ('CLIENTS' ),
3838 services = app .config .get ('SERVICES' ),
Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ def get_rp(op_hash):
9090
9191def finalize (op_hash , request_args ):
9292 rp = get_rp (op_hash )
93-
9493 try :
9594 session ['client_id' ] = rp .service_context .registration_response ['client_id' ]
9695 except KeyError :
You can’t perform that action at this time.
0 commit comments