@@ -24,7 +24,11 @@ def __init__(self, conf: Dict) -> None:
24
24
# server info
25
25
self .domain = lower_or_upper (conf , "domain" )
26
26
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
+
28
32
for param in ["server_name" , "base_url" ]:
29
33
set_param (self , conf , param , ** format_args )
30
34
@@ -48,22 +52,27 @@ def __init__(self, conf: Dict) -> None:
48
52
setattr (self , "rp_keys" , rp_keys_conf )
49
53
50
54
_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
56
61
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 )
60
65
61
- setattr (self , "clients" , _clients )
66
+ setattr (self , "clients" , _clients )
62
67
63
68
hash_seed = lower_or_upper (conf , 'hash_seed' )
64
69
if not hash_seed :
65
70
hash_seed = rnd_token (32 )
66
71
setattr (self , "hash_seed" , hash_seed )
72
+ self .load_extension (conf )
73
+
74
+ def load_extension (self , conf ):
75
+ pass
67
76
68
77
@classmethod
69
78
def create_from_config_file (cls , filename : str ):
0 commit comments