forked from oppia/oppia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
auth.pyi
138 lines (77 loc) · 2.43 KB
/
auth.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
from core.domain import auth_domain
import datetime
from typing import Any, Dict, List, Optional, Sequence, Union
from . import App
class UserRecord:
def __init__(
self, data: Dict[str, Any]
) -> None: ...
@property
def uid(self) -> str: ...
@property
def email(self) -> str: ...
@property
def custom_claims(self) -> Dict[str, str]: ...
@property
def disabled(self) -> bool: ...
class ImportUserRecord:
@property
def uid(self) -> str: ...
@property
def email(self) -> str: ...
@property
def custom_claims(self) -> Dict[str, str]: ...
@property
def disabled(self) -> bool: ...
class UserIdentifier: ...
class UidIdentifier(UserIdentifier):
def __init__(self, uid: str): ...
@property
def uid(self) -> str: ...
class GetUsersResult:
def __init__(
self, users: Sequence[UserRecord], not_found: Sequence[UserIdentifier]
) -> None: ...
@property
def users(self) -> List[UserRecord]: ...
@property
def not_found(self) -> List[UserIdentifier]: ...
class UserImportResult:
def __init__(
self, result: Dict[str, Any], total: int
) -> None: ...
class ListUsersPage: ...
class BatchDeleteAccountsResponse:
def __init__(
self, errors: List[Dict[str, Union[int, str]]] = ...
) -> None: ...
def create_session_cookie(
id_token: Optional[str],
expires_in: Optional[datetime.timedelta],
app: Optional[App] = ...
) -> str: ...
def create_user(**kwargs: Any) -> UserRecord: ...
def update_user(uid: str, **kwargs: Any) -> None: ...
def delete_user(uid: str) -> None: ...
def get_user(uid: str) -> UserRecord: ...
def get_users(uids: List[UserIdentifier]) -> GetUsersResult: ...
def set_custom_user_claims(
uid: str,
custom_claims: Optional[str],
app: Optional[App] = ...
) -> None: ...
def revoke_refresh_tokens(
uid: str, app: Optional[App] = ...
) -> None: ...
def verify_session_cookie(
session_cookie: str,
check_revoked: bool = ...,
app: Optional[App] = ...
) -> auth_domain.AuthClaimsDict: ...
class UserNotFoundError(Exception): ...
class ExpiredSessionCookieError(Exception): ...
class RevokedSessionCookieError(Exception): ...
class InvalidIdTokenError(Exception): ...
class UidAlreadyExistsError(Exception): ...
class UserDisabledError(Exception): ...
class InternalError(Exception): ...