Coverage for gws-app/gws/plugin/qfieldcloud/auth.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-05 13:35 +0200

1"""Token authorization method for QField clients.""" 

2 

3import gws 

4import gws.base.auth 

5 

6 

7@gws.ext.config.authMethod('qfieldcloud') 

8class Config(gws.base.auth.method.Config): 

9 """Token authentication for QField clients.""" 

10 

11 

12@gws.ext.object.authMethod('qfieldcloud') 

13class Object(gws.base.auth.method.Object): 

14 """QField Cloud authorization method. 

15 

16 Token authorization for QField clients. The ``qfieldcloud`` action creates 

17 sessions with this method on login and accepts only tokens of its sessions. 

18 """ 

19 

20 def configure(self): 

21 self.uid = 'gws.plugin.qfieldcloud.auth'