Skip to content

Commit bdc08c1

Browse files
Add oauth_credentials to AuthenticationResponse
1 parent 0848cd0 commit bdc08c1

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

workos/types/user_management/authentication_response.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from typing import Literal, Optional, TypeVar
2+
23
from workos.types.user_management.impersonator import Impersonator
4+
from workos.types.user_management.oauth_credentials import OauthCredentials
35
from workos.types.user_management.user import User
46
from workos.types.workos_model import WorkOSModel
57

6-
78
AuthenticationMethod = Literal[
89
"SSO",
910
"Password",
@@ -27,6 +28,7 @@ class AuthenticationResponse(_AuthenticationResponseBase):
2728
authentication_method: Optional[AuthenticationMethod] = None
2829
impersonator: Optional[Impersonator] = None
2930
organization_id: Optional[str] = None
31+
oauth_credentials: Optional[OauthCredentials] = None
3032
user: User
3133

3234

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from typing import List
2+
from workos.types.workos_model import WorkOSModel
3+
4+
5+
class OauthCredentials(WorkOSModel):
6+
"""Representation of a Oauth credentials"""
7+
8+
provider: str
9+
access_token: str
10+
refresh_token: str
11+
expires_at: int
12+
scopes: List[str]

0 commit comments

Comments
 (0)