Coverage for polar/customer_session/auth.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-12-05 15:52 +0000

1from typing import Annotated 1a

2 

3from fastapi import Depends 1a

4 

5from polar.auth.dependencies import Authenticator 1a

6from polar.auth.models import AuthSubject, User 1a

7from polar.auth.scope import Scope 1a

8from polar.models.organization import Organization 1a

9 

10_CustomerSessionWrite = Authenticator( 1a

11 required_scopes={ 

12 Scope.web_write, 

13 Scope.customer_sessions_write, 

14 }, 

15 allowed_subjects={User, Organization}, 

16) 

17CustomerSessionWrite = Annotated[ 1a

18 AuthSubject[User | Organization], Depends(_CustomerSessionWrite) 

19]