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 1
1
import os
2
+ import re
2
3
3
4
from cryptojwt import KeyJar
4
5
from cryptojwt .key_jar import init_key_jar
@@ -23,16 +24,15 @@ def init_oidc_rp_handler(app):
23
24
if rp_keys_conf :
24
25
_kj = init_key_jar (** rp_keys_conf )
25
26
_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 )
30
29
else :
31
30
_kj = KeyJar ()
32
31
_path = ''
33
32
_kj .verify_ssl = verify_ssl
34
33
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 ,
36
36
keyjar = _kj , jwks_path = _path ,
37
37
client_configs = app .config .get ('CLIENTS' ),
38
38
services = app .config .get ('SERVICES' ),
Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ def get_rp(op_hash):
90
90
91
91
def finalize (op_hash , request_args ):
92
92
rp = get_rp (op_hash )
93
-
94
93
try :
95
94
session ['client_id' ] = rp .service_context .registration_response ['client_id' ]
96
95
except KeyError :
You can’t perform that action at this time.
0 commit comments