@@ -24,7 +24,11 @@ def __init__(self, conf: Dict) -> None:
2424 # server info
2525 self .domain = lower_or_upper (conf , "domain" )
2626 self .port = lower_or_upper (conf , "port" )
27- format_args = {'domain' : self .domain , 'port' : self .port }
27+ if self .port :
28+ format_args = {'domain' : self .domain , 'port' : self .port }
29+ else :
30+ format_args = {'domain' : self .domain , "port" : "" }
31+
2832 for param in ["server_name" , "base_url" ]:
2933 set_param (self , conf , param , ** format_args )
3034
@@ -48,22 +52,27 @@ def __init__(self, conf: Dict) -> None:
4852 setattr (self , "rp_keys" , rp_keys_conf )
4953
5054 _clients = lower_or_upper (conf , "clients" )
51- for key , spec in _clients .items ():
52- if key == "" :
53- continue
54- # if not spec.get("redirect_uris"):
55- # continue
55+ if _clients :
56+ for key , spec in _clients .items ():
57+ if key == "" :
58+ continue
59+ # if not spec.get("redirect_uris"):
60+ # continue
5661
57- for uri in ['redirect_uris' , 'post_logout_redirect_uris' ,'frontchannel_logout_uri' ,
58- 'backchannel_logout_uri' ]:
59- replace (spec , uri , ** format_args )
62+ for uri in ['redirect_uris' , 'post_logout_redirect_uris' , 'frontchannel_logout_uri' ,
63+ 'backchannel_logout_uri' ]:
64+ replace (spec , uri , ** format_args )
6065
61- setattr (self , "clients" , _clients )
66+ setattr (self , "clients" , _clients )
6267
6368 hash_seed = lower_or_upper (conf , 'hash_seed' )
6469 if not hash_seed :
6570 hash_seed = rnd_token (32 )
6671 setattr (self , "hash_seed" , hash_seed )
72+ self .load_extension (conf )
73+
74+ def load_extension (self , conf ):
75+ pass
6776
6877 @classmethod
6978 def create_from_config_file (cls , filename : str ):
0 commit comments