This repository was archived by the owner on Jun 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +20
-12
lines changed
Expand file tree Collapse file tree 3 files changed +20
-12
lines changed Original file line number Diff line number Diff line change 1111
1212
1313def init_oidc_rp_handler (app ):
14- oidc_keys_conf = app .config .get ('OIDC_KEYS' )
14+ rp_keys_conf = app .config .get ('RP_KEYS' )
15+ if rp_keys_conf is None :
16+ rp_keys_conf = app .config .get ('OIDC_KEYS' )
17+
1518 verify_ssl = app .config .get ('VERIFY_SSL' )
19+ hash_seed = app .config .get ('HASH_SEED' )
20+ if not hash_seed :
21+ hash_seed = "BabyHoldOn"
1622
17- if oidc_keys_conf :
18- _kj = init_key_jar (** oidc_keys_conf )
19- _path = oidc_keys_conf ['public_path' ]
23+ if rp_keys_conf :
24+ _kj = init_key_jar (** rp_keys_conf )
25+ _path = rp_keys_conf ['public_path' ]
2026 if _path .startswith ('./' ):
2127 _path = _path [2 :]
2228 elif _path .startswith ('/' ):
@@ -26,7 +32,7 @@ def init_oidc_rp_handler(app):
2632 _path = ''
2733 _kj .verify_ssl = verify_ssl
2834
29- rph = RPHandler (base_url = app .config .get ('BASEURL' ), hash_seed = "BabyHoldOn" ,
35+ rph = RPHandler (base_url = app .config .get ('BASEURL' ), hash_seed = hash_seed ,
3036 keyjar = _kj , jwks_path = _path ,
3137 client_configs = app .config .get ('CLIENTS' ),
3238 services = app .config .get ('SERVICES' ),
Original file line number Diff line number Diff line change @@ -24,16 +24,13 @@ SECRET_KEY: 'secret_key'
2424SESSION_COOKIE_NAME : ' rp_session'
2525PREFERRED_URL_SCHEME : ' https'
2626
27- OIDC_KEYS :
27+ RP_KEYS :
2828 ' private_path ' : ' ./private/jwks.json'
2929 ' key_defs ' : *keydef
3030 ' public_path ' : ' ./static/jwks.json'
31- # this will create the jwks files if they absent
31+ # this will create the jwks files if they are absent
3232 ' read_only ' : False
3333
34- # PUBLIC_JWKS_PATH: 'https://127.0.0.1:8090/static/jwks.json'
35- # PRIVATE_JWKS_PATH: './private/jwks.json'
36-
3734client_preferences : &id001
3835 application_name : rphandler
3936 application_type : web
Original file line number Diff line number Diff line change @@ -19,8 +19,13 @@ KEYDEFS: &keydef
1919 " crv " : " P-256"
2020 " use " : ["sig"]
2121
22- PRIVATE_JWKS_PATH : " jwks_dir/jwks.json"
23- PUBLIC_JWKS_PATH : ' static/jwks.json'
22+ RP_KEYS :
23+ ' private_path ' : ' jwks_dir/jwks.json'
24+ ' key_defs ' : *keydef
25+ ' public_path ' : ' static/jwks.json'
26+ # this will create the jwks files if they absent
27+ ' read_only ' : False
28+
2429# information used when registering the client, this may be the same for all OPs
2530
2631services : &services
You can’t perform that action at this time.
0 commit comments