@@ -46,11 +46,13 @@ def exception(self) -> ConfigValueError:
4646class BaseBridgeConfig (BaseFileConfig , ABC ):
4747 registration_path : str
4848 _registration : Optional [Dict ]
49+ _check_tokens : bool
4950
5051 def __init__ (self , path : str , registration_path : str , base_path : str ) -> None :
5152 super ().__init__ (path , base_path )
5253 self .registration_path = registration_path
5354 self ._registration = None
55+ self ._check_tokens = True
5456
5557 def save (self ) -> None :
5658 super ().save ()
@@ -67,13 +69,14 @@ def forbidden_defaults(self) -> List[ForbiddenDefault]:
6769 return [
6870 ForbiddenDefault ("homeserver.address" , "https://example.com" ),
6971 ForbiddenDefault ("homeserver.domain" , "example.com" ),
72+ ] + ([
7073 ForbiddenDefault ("appservice.as_token" ,
7174 "This value is generated when generating the registration" ,
7275 "Did you forget to generate the registration?" ),
7376 ForbiddenDefault ("appservice.hs_token" ,
7477 "This value is generated when generating the registration" ,
7578 "Did you forget to generate the registration?" ),
76- ]
79+ ] if self . _check_tokens else [])
7780
7881 def check_default_values (self ) -> None :
7982 for default in self .forbidden_defaults :
0 commit comments