Coverage for gws-app / gws / base / auth / method.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-03-03 10:12 +0100

1from typing import Optional 

2import gws 

3 

4 

5class Config(gws.Config): 

6 """Auth method config.""" 

7 

8 secure: bool = True 

9 """Use only with SSL.""" 

10 allowInsecureFrom: Optional[list[str]] 

11 """Allow insecure access from these IPs.""" 

12 

13 

14class Object(gws.AuthMethod): 

15 def configure(self): 

16 self.secure = self.cfg('secure') 

17 self.allowInsecureFrom = self.cfg('allowInsecureFrom', default=[])