Coverage for polar/notification_recipient/auth.py: 100%
9 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-12-05 15:52 +0000
« prev ^ index » next coverage.py v7.10.6, created at 2025-12-05 15:52 +0000
1from typing import Annotated 1a
3from fastapi import Depends 1a
5from polar.auth.dependencies import Authenticator 1a
6from polar.auth.models import AuthSubject, User 1a
7from polar.auth.scope import Scope 1a
9_NotificationRecipientRead = Authenticator( 1a
10 required_scopes={
11 Scope.web_read,
12 Scope.web_write,
13 Scope.notification_recipients_read,
14 Scope.notification_recipients_write,
15 },
16 allowed_subjects={User},
17)
18NotificationRecipientRead = Annotated[ 1a
19 AuthSubject[User], Depends(_NotificationRecipientRead)
20]
22_NotificationRecipientWrite = Authenticator( 1a
23 required_scopes={
24 Scope.web_write,
25 Scope.notification_recipients_write,
26 },
27 allowed_subjects={User},
28)
29NotificationRecipientWrite = Annotated[ 1a
30 AuthSubject[User], Depends(_NotificationRecipientWrite)
31]