diff --git a/pkg/usermanagement/client.go b/pkg/usermanagement/client.go index 7cf1d21..d01a61a 100644 --- a/pkg/usermanagement/client.go +++ b/pkg/usermanagement/client.go @@ -303,6 +303,21 @@ type AuthenticateWithOrganizationSelectionOpts struct { UserAgent string `json:"user_agent,omitempty"` } +// AuthenticationMethod represents the authentication method used to authenticate the user. +type AuthenticationMethod string + +// Constants that enumerate the available authentication methods. +const ( + SSO AuthenticationMethod = "SSO" + Password AuthenticationMethod = "Password" + AppleOAuth AuthenticationMethod = "AppleOAuth" + GitHubOAuth AuthenticationMethod = "GitHubOAuth" + GoogleOAuth AuthenticationMethod = "GoogleOAuth" + MicrosoftOAuth AuthenticationMethod = "MicrosoftOAuth" + MagicAuthAuthenticationMethod AuthenticationMethod = "MagicAuth" + Impersonation AuthenticationMethod = "Impersonation" +) + type Impersonator struct { // The email address of the WorkOS Dashboard user using impersonation. Email string `json:"email"` @@ -328,6 +343,9 @@ type AuthenticateResponse struct { // `AuthenticateWithRefreshToken` RefreshToken string `json:"refresh_token"` + // The authentication method used to authenticate the user. + AuthenticationMethod AuthenticationMethod `json:"authentication_method"` + // Present if the authenticated user is being impersonated. Impersonator *Impersonator `json:"impersonator"` }