stytch

package
v5.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvTest = config.EnvTest
	EnvLive = config.EnvLive
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppleOAuthFactor

type AppleOAuthFactor struct {
	ID              string `json:"id,omitempty"`
	EmailID         string `json:"email_id,omitempty"`
	ProviderSubject string `json:"provider_subject,omitempty"`
}

type Argon2Config added in v5.11.0

type Argon2Config struct {
	Salt            string `json:"salt"`
	IterationAmount int    `json:"iteration_amount"`
	Memory          int    `json:"memory"`
	Threads         int    `json:"threads"`
	KeyLength       int    `json:"key_length"`
}

type Attributes

type Attributes struct {
	// The ip address of the user.
	IPAddress string `json:"ip_address,omitempty"`
	// The user agent of the user.
	UserAgent string `json:"user_agent,omitempty"`
}

* Structure for the custom type Attributes

type AuthenticationFactor

type AuthenticationFactor struct {
	Type                string `json:"type,omitempty"`
	DeliveryMethod      string `json:"delivery_method,omitempty"`
	LastAuthenticatedAt string `json:"last_authenticated_at,omitempty"`

	EmailFactor            EmailFactor            `json:"email_factor,omitempty"`
	PhoneNumberFactor      PhoneNumberFactor      `json:"phone_number_factor,omitempty"`
	GoogleOAuthFactor      GoogleOAuthFactor      `json:"google_oauth_factor,omitempty"`
	MicrosoftOAuthFactor   MicrosoftOAuthFactor   `json:"microsoft_oauth_factor,omitempty"`
	AppleOAuthFactor       AppleOAuthFactor       `json:"apple_oauth_factor,omitempty"`
	GithubOAuthFactor      GithubOAuthFactor      `json:"github_oauth_factor,omitempty"`
	GitLabOAuthFactor      GitLabOAuthFactor      `json:"gitlab_oauth_factor,omitempty"`
	FacebookOAuthFactor    FacebookOAuthFactor    `json:"facebook_oauth_factor,omitempty"`
	WebAuthnFactor         WebAuthnFactor         `json:"webauthn_factor,omitempty"`
	BiometricFactor        BiometricFactor        `json:"biometric_factor,omitempty"`
	AuthenticatorAppFactor AuthenticatorAppFactor `json:"authenticator_app_factor,omitempty"`
	RecoveryCodeFactor     RecoveryCodeFactor     `json:"recovery_code_factor,omitempty"`
	CryptoWalletFactor     CryptoWalletFactor     `json:"crypto_wallet_factor,omitempty"`
}

type AuthenticatorAppFactor

type AuthenticatorAppFactor struct {
	TOTPID string `json:"totp_id,omitempty"`
}

type BiometricFactor added in v5.13.0

type BiometricFactor struct {
	BiometricRegistrationID string `json:"biometric_registration_id,omitempty"`
}

type Claims

type Claims struct {
	StytchSession SessionClaim `json:"https://stytch.com/session"`
	jwt.RegisteredClaims
}

func (Claims) IsValid

func (c Claims) IsValid(projectID string) error

Validation options in GoJWT are currently unexported. Once they're exported, we can define this as a Valid() function, see https://github.com/golang-jwt/jwt/blob/1096e506e671d6d6fe134cc997bbd475937392c8/validator_option.go#L9-L11 //nolint:lll

type ClaimsWrapper added in v5.7.0

type ClaimsWrapper struct {
	Claims interface{} `json:"custom_claims"`
}

type Client

type Client struct {
	Config     *config.Config
	HTTPClient *http.Client
}

func New

func New(env config.Env, projectID string, secret string) *Client

func (*Client) NewRequest

func (c *Client) NewRequest(method string, path string, queryParams map[string]string,
	body []byte, v interface{},
) error

newRequest is used by Call to generate and Do a http.Request

func (*Client) RawRequest added in v5.7.0

func (c *Client) RawRequest(
	method string,
	path string,
	queryParams map[string]string,
	body []byte,
) ([]byte, error)

RawRequest sends the request and returns the successful response body as bytes. If the response is an error, the response body will be parsed and returned as (nil, stytcherror.Error).

Prefer using NewRequest (which unmarshals the response JSON) unless you need the actual bytes.

type CryptoWallet

type CryptoWallet struct {
	CryptoWalletID      string `json:"crypto_wallet_id,omitempty"`
	CryptoWalletAddress string `json:"crypto_wallet_address,omitempty"`
	CryptoWalletType    string `json:"crypto_wallet_type,omitempty"`
	Verified            bool   `json:"verified,omitempty"`
}

type CryptoWalletAuthenticateParams

type CryptoWalletAuthenticateParams struct {
	CryptoWalletAddress    string                 `json:"crypto_wallet_address,omitempty"`
	CryptoWalletType       string                 `json:"crypto_wallet_type,omitempty"`
	Signature              string                 `json:"signature,omitempty"`
	SessionToken           string                 `json:"session_token,omitempty"`
	SessionJWT             string                 `json:"session_jwt,omitempty"`
	SessionDurationMinutes int32                  `json:"session_duration_minutes,omitempty"`
	SessionCustomClaims    map[string]interface{} `json:"session_custom_claims,omitempty"`
}

type CryptoWalletAuthenticateResponse

type CryptoWalletAuthenticateResponse struct {
	RequestID    string  `json:"request_id,omitempty"`
	StatusCode   int     `json:"status_code,omitempty"`
	UserID       string  `json:"user_id,omitempty"`
	SessionToken string  `json:"session_token,omitempty"`
	SessionJWT   string  `json:"session_jwt,omitempty"`
	Session      Session `json:"session,omitempty"`
	User         User    `json:"user,omitempty"`
}

type CryptoWalletAuthenticateStartParams

type CryptoWalletAuthenticateStartParams struct {
	CryptoWalletAddress string `json:"crypto_wallet_address,omitempty"`
	CryptoWalletType    string `json:"crypto_wallet_type,omitempty"`
	UserID              string `json:"user_id,omitempty"`
	SessionToken        string `json:"session_token,omitempty"`
	SessionJWT          string `json:"session_jwt,omitempty"`
}

type CryptoWalletAuthenticateStartResponse

type CryptoWalletAuthenticateStartResponse struct {
	RequestID   string `json:"request_id,omitempty"`
	StatusCode  int    `json:"status_code,omitempty"`
	UserID      string `json:"user_id,omitempty"`
	Challenge   string `json:"challenge,omitempty"`
	UserCreated bool   `json:"user_created,omitempty"`
}

type CryptoWalletFactor

type CryptoWalletFactor struct {
	CryptoWalletID      string `json:"crypto_wallet_id,omitempty"`
	CryptoWalletAddress string `json:"crypto_wallet_address,omitempty"`
	CryptoWalletType    string `json:"crypto_wallet_type,omitempty"`
}

type CryptoWalletString

type CryptoWalletString struct {
	CryptoWalletAddress string `json:"crypto_wallet_address,omitempty"`
	CryptoWalletType    string `json:"crypto_wallet_type,omitempty"`
}

type Email

type Email struct {
	EmailID  string `json:"email_id,omitempty"`
	Email    string `json:"email,omitempty"`
	Verified bool   `json:"verified,omitempty"`
}

type EmailFactor

type EmailFactor struct {
	EmailID      string `json:"email_id,omitempty"`
	EmailAddress string `json:"email_address,omitempty"`
}

type EmailString

type EmailString struct {
	Email string `json:"email,omitempty"`
}

type FacebookOAuthFactor

type FacebookOAuthFactor struct {
	ID              string `json:"id,omitempty"`
	EmailID         string `json:"email_id,omitempty"`
	ProviderSubject string `json:"provider_subject,omitempty"`
}

type Feedback added in v5.8.0

type Feedback struct {
	Warning     string   `json:"warning,omitempty"`
	Suggestions []string `json:"suggestions,omitempty"`
}

type GitLabOAuthFactor

type GitLabOAuthFactor struct {
	ID              string `json:"id,omitempty"`
	EmailID         string `json:"email_id,omitempty"`
	ProviderSubject string `json:"provider_subject,omitempty"`
}

type GithubOAuthFactor

type GithubOAuthFactor struct {
	ID              string `json:"id,omitempty"`
	EmailID         string `json:"email_id,omitempty"`
	ProviderSubject string `json:"provider_subject,omitempty"`
}

type GoogleOAuthFactor

type GoogleOAuthFactor struct {
	ID              string `json:"id,omitempty"`
	EmailID         string `json:"email_id,omitempty"`
	ProviderSubject string `json:"provider_subject,omitempty"`
}

type HashType added in v5.8.0

type HashType string
const (
	HashTypeBcrypt   HashType = "bcrypt"
	HashTypeMD5      HashType = "md_5"
	HashTypeArgon2I  HashType = "argon_2i"
	HashTypeArgon2ID HashType = "argon_2id"
	HashTypeSHA1     HashType = "sha_1"
	HashTypeScrypt   HashType = "scrypt"
)

type JWTAuthenticationFactor

type JWTAuthenticationFactor struct {
	Type                string           `json:"type,omitempty"`
	DeliveryMethod      string           `json:"delivery_method,omitempty"`
	LastAuthenticatedAt *jwt.NumericDate `json:"last_authenticated_at,omitempty"`

	EmailFactor            EmailFactor            `json:"email_factor,omitempty"`
	PhoneNumberFactor      PhoneNumberFactor      `json:"phone_number_factor,omitempty"`
	GoogleOAuthFactor      GoogleOAuthFactor      `json:"google_oauth_factor,omitempty"`
	MicrosoftOAuthFactor   MicrosoftOAuthFactor   `json:"microsoft_oauth_factor,omitempty"`
	AppleOAuthFactor       AppleOAuthFactor       `json:"apple_oauth_factor,omitempty"`
	GithubOAuthFactor      GithubOAuthFactor      `json:"github_oauth_factor,omitempty"`
	FacebookOAuthFactor    FacebookOAuthFactor    `json:"facebook_oauth_factor,omitempty"`
	WebAuthnFactor         WebAuthnFactor         `json:"webauthn_factor,omitempty"`
	BiometricFactor        BiometricFactor        `json:"biometric_factor,omitempty"`
	AuthenticatorAppFactor AuthenticatorAppFactor `json:"authenticator_app_factor,omitempty"`
	RecoveryCodeFactor     RecoveryCodeFactor     `json:"recovery_code_factor,omitempty"`
	CryptoWalletFactor     CryptoWalletFactor     `json:"crypto_wallet_factor,omitempty"`
}

type Key

type Key struct {
	Typ     string   `json:"kty"`
	Use     string   `json:"use"`
	KeyOps  []string `json:"key_ops"`
	Alg     string   `json:"alg"`
	KeyID   string   `json:"kid"`
	X5C     []string `json:"x5c"`
	X5TS256 string   `json:"x5tS256"`
	N       string   `json:"n"`
	E       string   `json:"e"`
}

type MD5Config added in v5.11.0

type MD5Config struct {
	PrependSalt string `json:"prepend_salt,omitempty"`
	AppendSalt  string `json:"append_salt,omitempty"`
}

type MagicLinksAuthenticateParams

type MagicLinksAuthenticateParams struct {
	Token                  string                 `json:"token,omitempty"`
	Options                Options                `json:"options,omitempty"`
	Attributes             Attributes             `json:"attributes,omitempty"`
	SessionToken           string                 `json:"session_token,omitempty"`
	SessionJWT             string                 `json:"session_jwt,omitempty"`
	SessionDurationMinutes int32                  `json:"session_duration_minutes,omitempty"`
	SessionCustomClaims    map[string]interface{} `json:"session_custom_claims,omitempty"`
	CodeVerifier           string                 `json:"code_verifier,omitempty"`
}

type MagicLinksAuthenticateResponse

type MagicLinksAuthenticateResponse struct {
	RequestID     string  `json:"request_id,omitempty"`
	StatusCode    int     `json:"status_code,omitempty"`
	UserID        string  `json:"user_id,omitempty"`
	MethodID      string  `json:"method_id,omitempty"`
	SessionToken  string  `json:"session_token,omitempty"`
	SessionJWT    string  `json:"session_jwt,omitempty"`
	Session       Session `json:"session,omitempty"`
	User          User    `json:"user,omitempty"`
	ResetSessions bool    `json:"reset_sessions,omitempty"`
}

type MagicLinksCreateParams

type MagicLinksCreateParams struct {
	UserID            string     `json:"user_id,omitempty"`
	ExpirationMinutes int32      `json:"expiration_minutes,omitempty"`
	Attributes        Attributes `json:"attributes,omitempty"`
}

type MagicLinksCreateResponse

type MagicLinksCreateResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	Token      string `json:"token,omitempty"`
}

type MagicLinksEmailInviteParams

type MagicLinksEmailInviteParams struct {
	Email                   string     `json:"email"`
	InviteMagicLinkURL      string     `json:"invite_magic_link_url,omitempty"`
	InviteExpirationMinutes int32      `json:"invite_expiration_minutes,omitempty"`
	Name                    Name       `json:"name,omitempty"`
	Attributes              Attributes `json:"attributes,omitempty"`
}

type MagicLinksEmailInviteResponse

type MagicLinksEmailInviteResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	EmailID    string `json:"email_id,omitempty"`
}

type MagicLinksEmailLoginOrCreateParams

type MagicLinksEmailLoginOrCreateParams struct {
	Email                   string     `json:"email"`
	LoginMagicLinkURL       string     `json:"login_magic_link_url,omitempty"`
	SignupMagicLinkURL      string     `json:"signup_magic_link_url,omitempty"`
	LoginExpirationMinutes  int32      `json:"login_expiration_minutes,omitempty"`
	SignupExpirationMinutes int32      `json:"signup_expiration_minutes,omitempty"`
	CreateUserAsPending     bool       `json:"create_user_as_pending,omitempty"`
	Attributes              Attributes `json:"attributes,omitempty"`
	CodeChallenge           string     `json:"code_challenge,omitempty"`
}

type MagicLinksEmailLoginOrCreateResponse

type MagicLinksEmailLoginOrCreateResponse struct {
	RequestID   string `json:"request_id,omitempty"`
	StatusCode  int    `json:"status_code,omitempty"`
	UserID      string `json:"user_id,omitempty"`
	EmailID     string `json:"email_id,omitempty"`
	UserCreated bool   `json:"user_created,omitempty"`
}

type MagicLinksEmailRevokeInviteParams

type MagicLinksEmailRevokeInviteParams struct {
	Email string `json:"email"`
}

type MagicLinksEmailRevokeInviteResponse

type MagicLinksEmailRevokeInviteResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
}

type MagicLinksEmailSendParams

type MagicLinksEmailSendParams struct {
	Email                   string     `json:"email"`
	LoginMagicLinkURL       string     `json:"login_magic_link_url,omitempty"`
	SignupMagicLinkURL      string     `json:"signup_magic_link_url,omitempty"`
	LoginExpirationMinutes  int32      `json:"login_expiration_minutes,omitempty"`
	SignupExpirationMinutes int32      `json:"signup_expiration_minutes,omitempty"`
	Attributes              Attributes `json:"attributes,omitempty"`
	CodeChallenge           string     `json:"code_challenge,omitempty"`
	UserID                  string     `json:"user_id,omitempty"`
	SessionToken            string     `json:"session_token,omitempty"`
	SessionJWT              string     `json:"session_jwt,omitempty"`
}

MAGIC LINK - EMAIL

type MagicLinksEmailSendResponse

type MagicLinksEmailSendResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	EmailID    string `json:"email_id,omitempty"`
}

type MicrosoftOAuthFactor

type MicrosoftOAuthFactor struct {
	ID              string `json:"id,omitempty"`
	EmailID         string `json:"email_id,omitempty"`
	ProviderSubject string `json:"provider_subject,omitempty"`
}

type Name

type Name struct {
	FirstName  string `json:"first_name,omitempty"`
	MiddleName string `json:"middle_name,omitempty"`
	LastName   string `json:"last_name,omitempty"`
}

type OAuthAuthenticateParams

type OAuthAuthenticateParams struct {
	Token                  string                 `json:"token,omitempty"`
	SessionToken           string                 `json:"session_token,omitempty"`
	SessionJWT             string                 `json:"session_jwt,omitempty"`
	SessionDurationMinutes int32                  `json:"session_duration_minutes,omitempty"`
	SessionCustomClaims    map[string]interface{} `json:"session_custom_claims,omitempty"`
	CodeVerifier           string                 `json:"code_verifier,omitempty"`
}

type OAuthAuthenticateResponse

type OAuthAuthenticateResponse struct {
	RequestID       string         `json:"request_id,omitempty"`
	StatusCode      int            `json:"status_code,omitempty"`
	UserID          string         `json:"user_id,omitempty"`
	ProviderSubject string         `json:"provider_subject,omitempty"`
	ProviderType    ProviderType   `json:"provider_type,omitempty"`
	Session         *Session       `json:"session,omitempty"`
	SessionToken    string         `json:"session_token,omitempty"`
	SessionJWT      string         `json:"session_jwt,omitempty"`
	ProviderValues  ProviderValues `json:"provider_values,omitempty"`
	ResetSessions   bool           `json:"reset_sessions,omitempty"`
}

type OAuthProvider

type OAuthProvider struct {
	ProviderType      string `json:"provider_type,omitempty"`
	ProviderSubject   string `json:"provider_subject,omitempty"`
	ProfilePictureURL string `json:"profile_picture_url,omitempty"`
	Locale            string `json:"locale,omitempty"`
}

type OTPsAuthenticateParams

type OTPsAuthenticateParams struct {
	MethodID               string                 `json:"method_id"`
	Code                   string                 `json:"code"`
	Options                Options                `json:"options,omitempty"`
	Attributes             Attributes             `json:"attributes,omitempty"`
	SessionToken           string                 `json:"session_token,omitempty"`
	SessionDurationMinutes int32                  `json:"session_duration_minutes,omitempty"`
	SessionCustomClaims    map[string]interface{} `json:"session_custom_claims,omitempty"`
	SessionJWT             string                 `json:"session_jwt,omitempty"`
}

type OTPsAuthenticateResponse

type OTPsAuthenticateResponse struct {
	RequestID     string  `json:"request_id,omitempty"`
	StatusCode    int     `json:"status_code,omitempty"`
	UserID        string  `json:"user_id,omitempty"`
	MethodID      string  `json:"method_id,omitempty"`
	SessionToken  string  `json:"session_token,omitempty"`
	Session       Session `json:"session,omitempty"`
	SessionJWT    string  `json:"session_jwt,omitempty"`
	User          User    `json:"user,omitempty"`
	ResetSessions bool    `json:"reset_sessions,omitempty"`
}

type OTPsEmailLoginOrCreateParams

type OTPsEmailLoginOrCreateParams struct {
	Email               string     `json:"email"`
	ExpirationMinutes   int32      `json:"expiration_minutes,omitempty"`
	Attributes          Attributes `json:"attributes,omitempty"`
	CreateUserAsPending bool       `json:"create_user_as_pending,omitempty"`
}

type OTPsEmailLoginOrCreateResponse

type OTPsEmailLoginOrCreateResponse struct {
	RequestID   string `json:"request_id,omitempty"`
	StatusCode  int    `json:"status_code,omitempty"`
	UserID      string `json:"user_id,omitempty"`
	EmailID     string `json:"email_id,omitempty"`
	UserCreated bool   `json:"user_created,omitempty"`
}

type OTPsEmailSendParams

type OTPsEmailSendParams struct {
	Email             string     `json:"email"`
	ExpirationMinutes int32      `json:"expiration_minutes,omitempty"`
	Attributes        Attributes `json:"attributes,omitempty"`
	UserID            string     `json:"user_id,omitempty"`
	SessionToken      string     `json:"session_token,omitempty"`
	SessionJWT        string     `json:"session_jwt,omitempty"`
}

OTP - Email

type OTPsEmailSendResponse

type OTPsEmailSendResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	EmailID    string `json:"email_id,omitempty"`
}

type OTPsSMSLoginOrCreateParams

type OTPsSMSLoginOrCreateParams struct {
	PhoneNumber         string     `json:"phone_number"`
	ExpirationMinutes   int32      `json:"expiration_minutes,omitempty"`
	Attributes          Attributes `json:"attributes,omitempty"`
	CreateUserAsPending bool       `json:"create_user_as_pending,omitempty"`
}

type OTPsSMSLoginOrCreateResponse

type OTPsSMSLoginOrCreateResponse struct {
	RequestID   string `json:"request_id,omitempty"`
	StatusCode  int    `json:"status_code,omitempty"`
	UserID      string `json:"user_id,omitempty"`
	PhoneID     string `json:"phone_id,omitempty"`
	UserCreated bool   `json:"user_created,omitempty"`
}

type OTPsSMSSendParams

type OTPsSMSSendParams struct {
	PhoneNumber       string     `json:"phone_number"`
	ExpirationMinutes int32      `json:"expiration_minutes,omitempty"`
	Attributes        Attributes `json:"attributes,omitempty"`
	UserID            string     `json:"user_id,omitempty"`
	SessionToken      string     `json:"session_token,omitempty"`
	SessionJWT        string     `json:"session_jwt,omitempty"`
}

OTP - SMS

type OTPsSMSSendResponse

type OTPsSMSSendResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	PhoneID    string `json:"phone_id,omitempty"`
}

type OTPsWhatsAppLoginOrCreateParams

type OTPsWhatsAppLoginOrCreateParams struct {
	PhoneNumber         string     `json:"phone_number"`
	ExpirationMinutes   int32      `json:"expiration_minutes,omitempty"`
	Attributes          Attributes `json:"attributes,omitempty"`
	CreateUserAsPending bool       `json:"create_user_as_pending,omitempty"`
}

type OTPsWhatsAppLoginOrCreateResponse

type OTPsWhatsAppLoginOrCreateResponse struct {
	RequestID   string `json:"request_id,omitempty"`
	StatusCode  int    `json:"status_code,omitempty"`
	UserID      string `json:"user_id,omitempty"`
	PhoneID     string `json:"phone_id,omitempty"`
	UserCreated bool   `json:"user_created,omitempty"`
}

type OTPsWhatsAppSendParams

type OTPsWhatsAppSendParams struct {
	PhoneNumber       string     `json:"phone_number"`
	ExpirationMinutes int32      `json:"expiration_minutes,omitempty"`
	Attributes        Attributes `json:"attributes,omitempty"`
	UserID            string     `json:"user_id,omitempty"`
	SessionToken      string     `json:"session_token,omitempty"`
	SessionJWT        string     `json:"session_jwt,omitempty"`
}

OTP - WhatsApp

type OTPsWhatsAppSendResponse

type OTPsWhatsAppSendResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	PhoneID    string `json:"phone_id,omitempty"`
}

type Options

type Options struct {
	// Require that the ip address the magic link was requested from
	// matches the ip address it's clicked from.
	IPMatchRequired bool `json:"ip_match_required,omitempty"`
	// Require that the user agent the magic link was requested from
	// matches the user agent it's clicked from.
	UserAgentMatchRequired bool `json:"user_agent_match_required,omitempty"`
}

* Structure for the custom type Options

type Password added in v5.8.0

type Password struct {
	PasswordID    string `json:"password_id,omitempty"`
	RequiresReset bool   `json:"requires_reset,omitempty"`
}

type PasswordEmailResetParams added in v5.8.0

type PasswordEmailResetParams struct {
	Token                  string                 `json:"token,omitempty"`
	Password               string                 `json:"password,omitempty"`
	SessionToken           string                 `json:"session_token,omitempty"`
	SessionJWT             string                 `json:"session_jwt,omitempty"`
	SessionDurationMinutes int32                  `json:"session_duration_minutes,omitempty"`
	SessionCustomClaims    map[string]interface{} `json:"session_custom_claims,omitempty"`
	Options                Options                `json:"options,omitempty"`
	Attributes             Attributes             `json:"attributes,omitempty"`
	CodeVerifier           string                 `json:"code_verifier,omitempty"`
}

type PasswordEmailResetResponse added in v5.8.0

type PasswordEmailResetResponse struct {
	RequestID    string  `json:"request_id,omitempty"`
	StatusCode   int     `json:"status_code,omitempty"`
	UserID       string  `json:"user_id,omitempty"`
	SessionToken string  `json:"session_token,omitempty"`
	SessionJWT   string  `json:"session_jwt,omitempty"`
	Session      Session `json:"session,omitempty"`
	User         User    `json:"user,omitempty"`
}

type PasswordEmailResetStartParams added in v5.8.0

type PasswordEmailResetStartParams struct {
	Email                          string     `json:"email"`
	LoginRedirectURL               string     `json:"login_redirect_url,omitempty"`
	ResetPasswordRedirectURL       string     `json:"reset_password_redirect_url,omitempty"`
	ResetPasswordExpirationMinutes int32      `json:"reset_password_expiration_minutes,omitempty"`
	Attributes                     Attributes `json:"attributes,omitempty"`
	CodeChallenge                  string     `json:"code_challenge,omitempty"`
}

PASSWORD - EMAIL

type PasswordEmailResetStartResponse added in v5.8.0

type PasswordEmailResetStartResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	EmailID    string `json:"email_id,omitempty"`
}

type PasswordExistingPasswordResetParams added in v5.12.0

type PasswordExistingPasswordResetParams struct {
	Email                  string                 `json:"email,omitempty"`
	ExistingPassword       string                 `json:"existing_password,omitempty"`
	NewPassword            string                 `json:"new_password,omitempty"`
	SessionToken           string                 `json:"session_token,omitempty"`
	SessionJWT             string                 `json:"session_jwt,omitempty"`
	SessionDurationMinutes int32                  `json:"session_duration_minutes,omitempty"`
	SessionCustomClaims    map[string]interface{} `json:"session_custom_claims,omitempty"`
}

PASSWORD - EXISTING PASSWORD

type PasswordExistingPasswordResetResponse added in v5.12.0

type PasswordExistingPasswordResetResponse struct {
	RequestID    string  `json:"request_id,omitempty"`
	StatusCode   int     `json:"status_code,omitempty"`
	UserID       string  `json:"user_id,omitempty"`
	SessionToken string  `json:"session_token,omitempty"`
	SessionJWT   string  `json:"session_jwt,omitempty"`
	Session      Session `json:"session,omitempty"`
	User         User    `json:"user,omitempty"`
}

type PasswordSessionResetParams added in v5.13.0

type PasswordSessionResetParams struct {
	Password     string `json:"password,omitempty"`
	SessionToken string `json:"session_token,omitempty"`
	SessionJWT   string `json:"session_jwt,omitempty"`
}

PASSWORD - SESSION

type PasswordSessionResetResponse added in v5.13.0

type PasswordSessionResetResponse struct {
	RequestID  string  `json:"request_id,omitempty"`
	StatusCode int     `json:"status_code,omitempty"`
	UserID     string  `json:"user_id,omitempty"`
	User       User    `json:"user,omitempty"`
	Session    Session `json:"session,omitempty"`
}

type PasswordsAuthenticateParams added in v5.8.0

type PasswordsAuthenticateParams struct {
	Email                  string                 `json:"email"`
	Password               string                 `json:"password"`
	SessionToken           string                 `json:"session_token,omitempty"`
	SessionJWT             string                 `json:"session_jwt,omitempty"`
	SessionDurationMinutes int32                  `json:"session_duration_minutes,omitempty"`
	SessionCustomClaims    map[string]interface{} `json:"session_custom_claims,omitempty"`
}

type PasswordsAuthenticateResponse added in v5.8.0

type PasswordsAuthenticateResponse struct {
	RequestID    string  `json:"request_id,omitempty"`
	StatusCode   int     `json:"status_code,omitempty"`
	UserID       string  `json:"user_id,omitempty"`
	SessionToken string  `json:"session_token,omitempty"`
	Session      Session `json:"session,omitempty"`
	SessionJWT   string  `json:"session_jwt,omitempty"`
	User         User    `json:"user,omitempty"`
}

type PasswordsCreateParams added in v5.8.0

type PasswordsCreateParams struct {
	Email                  string                 `json:"email"`
	Password               string                 `json:"password"`
	SessionDurationMinutes int32                  `json:"session_duration_minutes,omitempty"`
	SessionCustomClaims    map[string]interface{} `json:"session_custom_claims,omitempty"`
}

type PasswordsCreateResponse added in v5.8.0

type PasswordsCreateResponse struct {
	RequestID    string  `json:"request_id,omitempty"`
	StatusCode   int     `json:"status_code,omitempty"`
	UserID       string  `json:"user_id,omitempty"`
	EmailID      string  `json:"email_id,omitempty"`
	SessionToken string  `json:"session_token,omitempty"`
	Session      Session `json:"session,omitempty"`
	SessionJWT   string  `json:"session_jwt,omitempty"`
	User         User    `json:"user,omitempty"`
}

type PasswordsMigrateParams added in v5.8.0

type PasswordsMigrateParams struct {
	Email        string       `json:"email"`
	Hash         string       `json:"hash"`
	HashType     HashType     `json:"hash_type"`
	MD5Config    MD5Config    `json:"md_5_config,omitempty"`
	Argon2Config Argon2Config `json:"argon_2_config,omitempty"`
	SHA1Config   SHA1Config   `json:"sha_1_config,omitempty"`
	ScryptConfig ScryptConfig `json:"scrypt_config,omitempty"`
}

type PasswordsMigrateResponse added in v5.8.0

type PasswordsMigrateResponse struct {
	RequestID   string `json:"request_id,omitempty"`
	StatusCode  int    `json:"status_code,omitempty"`
	UserID      string `json:"user_id,omitempty"`
	EmailID     string `json:"email_id,omitempty"`
	UserCreated bool   `json:"user_created,omitempty"`
}

type PasswordsStrengthCheckParams added in v5.8.0

type PasswordsStrengthCheckParams struct {
	Email    string `json:"email"`
	Password string `json:"password,omitempty"`
}

type PasswordsStrengthCheckResponse added in v5.8.0

type PasswordsStrengthCheckResponse struct {
	RequestID        string   `json:"request_id,omitempty"`
	StatusCode       int      `json:"status_code,omitempty"`
	ValidPassword    bool     `json:"valid_password,omitempty"`
	Score            int      `json:"score,omitempty"`
	BreachedPassword bool     `json:"breached_password,omitempty"`
	Feedback         Feedback `json:"feedback,omitempty"`
}

type PendingUsers

type PendingUsers struct {
	UserID        string         `json:"user_id,omitempty"`
	Name          Name           `json:"name,omitempty"`
	Emails        []Email        `json:"emails,omitempty"`
	PhoneNumbers  []PhoneNumber  `json:"phone_numbers,omitempty"`
	TOTPs         []UserTOTP     `json:"totps,omitempty"`
	CryptoWallets []CryptoWallet `json:"crypto_wallets,omitempty"`
	Password      Password       `json:"password,omitempty"`
	Status        string         `json:"status,omitempty"`
	InvitedAt     string         `json:"invited_at,omitempty"`
}

type PhoneNumber

type PhoneNumber struct {
	PhoneID     string `json:"phone_id,omitempty"`
	PhoneNumber string `json:"phone_number,omitempty"`
	Verified    bool   `json:"verified,omitempty"`
}

type PhoneNumberFactor

type PhoneNumberFactor struct {
	PhoneID     string `json:"phone_id,omitempty"`
	PhoneNumber string `json:"phone_number,omitempty"`
}

type PhoneNumberString

type PhoneNumberString struct {
	PhoneNumber string `json:"phone_number,omitempty"`
}

type ProviderType

type ProviderType string
const (
	ProviderTypeGoogle    ProviderType = "Google"
	ProviderTypeFacebook  ProviderType = "Facebook"
	ProviderTypeApple     ProviderType = "Apple"
	ProviderTypeMicrosoft ProviderType = "Microsoft"
	ProviderTypeGithub    ProviderType = "Github"
	ProviderTypeGitlab    ProviderType = "GitLab"
)

type ProviderValues

type ProviderValues struct {
	AccessToken  string     `json:"access_token,omitempty"`
	RefreshToken string     `json:"refresh_token,omitempty"`
	IDToken      string     `json:"id_token,omitempty"`
	ExpiresAt    *time.Time `json:"expires_at,omitempty"`
	Scopes       []string   `json:"scopes,omitempty"`
}

type RecoveryCodeFactor

type RecoveryCodeFactor struct {
	TOTPRecoveryCodeID string `json:"totp_recovery_code_id,omitempty"`
}

type SHA1Config added in v5.13.0

type SHA1Config struct {
	PrependSalt string `json:"prepend_salt,omitempty"`
	AppendSalt  string `json:"append_salt,omitempty"`
}

type ScryptConfig added in v5.13.0

type ScryptConfig struct {
	Salt       string `json:"salt"`
	NParameter int    `json:"n_parameter"`
	RParameter int    `json:"r_parameter"`
	PParameter int    `json:"p_parameter"`
	KeyLength  int    `json:"key_length"`
}

type Session

type Session struct {
	SessionID             string                  `json:"session_id,omitempty"`
	UserID                string                  `json:"user_id,omitempty"`
	StartedAt             string                  `json:"started_at,omitempty"`
	LastAccessedAt        string                  `json:"last_accessed_at,omitempty"`
	ExpiresAt             string                  `json:"expires_at,omitempty"`
	Attributes            Attributes              `json:"attributes,omitempty"`
	AuthenticationFactors []*AuthenticationFactor `json:"authentication_factors,omitempty"`
	CustomClaims          interface{}             `json:"custom_claims"`
}

* Structure for the custom type Session

type SessionClaim

type SessionClaim struct {
	ID                    string                 `json:"id"`
	StartedAt             string                 `json:"started_at"`
	LastAccessedAt        string                 `json:"last_accessed_at"`
	ExpiresAt             string                 `json:"expires_at"`
	Attributes            Attributes             `json:"attributes"`
	AuthenticationFactors []AuthenticationFactor `json:"authentication_factors"`
}

type SessionWrapper added in v5.7.0

type SessionWrapper struct {
	Session ClaimsWrapper `json:"session"`
}

SessionWrapper wraps a session object with a custom_claims field so that we can unmarshal custom claims from authenticate responses

type SessionsAuthenticateParams

type SessionsAuthenticateParams struct {
	SessionToken           string                 `json:"session_token,omitempty"`
	SessionDurationMinutes int32                  `json:"session_duration_minutes,omitempty"`
	SessionJWT             string                 `json:"session_jwt,omitempty"`
	SessionCustomClaims    map[string]interface{} `json:"session_custom_claims,omitempty"`
}

type SessionsAuthenticateResponse

type SessionsAuthenticateResponse struct {
	RequestID    string  `json:"request_id,omitempty"`
	Session      Session `json:"session,omitempty"`
	SessionToken string  `json:"session_token,omitempty"`
	SessionJWT   string  `json:"session_jwt,omitempty"`
	User         User    `json:"user,omitempty"`
}

type SessionsGetJWKSParams

type SessionsGetJWKSParams struct {
	ProjectID string `json:"project_id"`
}

type SessionsGetJWKSResponse

type SessionsGetJWKSResponse struct {
	RequestID string `json:"request_id,omitempty"`
	Keys      []Key  `json:"keys,omitempty"`
}

type SessionsGetParams

type SessionsGetParams struct {
	UserID string `json:"user_id"`
}

type SessionsGetResponse

type SessionsGetResponse struct {
	RequestID string    `json:"request_id,omitempty"`
	Sessions  []Session `json:"sessions,omitempty"`
}

type SessionsRevokeParams

type SessionsRevokeParams struct {
	SessionID    string `json:"session_id,omitempty"`
	SessionToken string `json:"session_token,omitempty"`
}

type SessionsRevokeResponse

type SessionsRevokeResponse struct {
	RequestID string `json:"request_id,omitempty"`
}

type TOTP

type TOTP struct {
	TOTPID        string   `json:"totp_id,omitempty"`
	Verified      bool     `json:"verified,omitempty"`
	RecoveryCodes []string `json:"recovery_codes,omitempty"`
}

type TOTPsAuthenticateParams

type TOTPsAuthenticateParams struct {
	UserID                 string                 `json:"user_id"`
	TOTPCode               string                 `json:"totp_code"`
	SessionToken           string                 `json:"session_token,omitempty"`
	SessionJWT             string                 `json:"session_jwt,omitempty"`
	SessionDurationMinutes int32                  `json:"session_duration_minutes,omitempty"`
	SessionCustomClaims    map[string]interface{} `json:"session_custom_claims,omitempty"`
}

type TOTPsAuthenticateResponse

type TOTPsAuthenticateResponse struct {
	RequestID    string  `json:"request_id,omitempty"`
	StatusCode   int     `json:"status_code,omitempty"`
	UserID       string  `json:"user_id,omitempty"`
	TOTPID       string  `json:"totp_id,omitempty"`
	SessionToken string  `json:"session_token,omitempty"`
	SessionJWT   string  `json:"session_jwt,omitempty"`
	Session      Session `json:"session,omitempty"`
	User         User    `json:"user,omitempty"`
}

type TOTPsCreateParams

type TOTPsCreateParams struct {
	UserID            string `json:"user_id"`
	ExpirationMinutes int32  `json:"expiration_minutes,omitempty"`
}

type TOTPsCreateResponse

type TOTPsCreateResponse struct {
	RequestID     string   `json:"request_id,omitempty"`
	StatusCode    int      `json:"status_code,omitempty"`
	Secret        string   `json:"secret,omitempty"`
	TOTPID        string   `json:"totp_id,omitempty"`
	QRCode        string   `json:"qr_code,omitempty"`
	RecoveryCodes []string `json:"recovery_codes,omitempty"`
	User          User     `json:"user,omitempty"`
	UserID        string   `json:"user_id,omitempty"`
}

type TOTPsRecoverParams

type TOTPsRecoverParams struct {
	UserID                 string                 `json:"user_id"`
	RecoveryCode           string                 `json:"recovery_code"`
	SessionToken           string                 `json:"session_token,omitempty"`
	SessionJWT             string                 `json:"session_jwt,omitempty"`
	SessionDurationMinutes int32                  `json:"session_duration_minutes,omitempty"`
	SessionCustomClaims    map[string]interface{} `json:"session_custom_claims,omitempty"`
}

type TOTPsRecoverResponse

type TOTPsRecoverResponse struct {
	RequestID    string  `json:"request_id,omitempty"`
	StatusCode   int     `json:"status_code,omitempty"`
	UserID       string  `json:"user_id,omitempty"`
	TOTPID       string  `json:"totp_id,omitempty"`
	SessionToken string  `json:"session_token,omitempty"`
	SessionJWT   string  `json:"session_jwt,omitempty"`
	Session      Session `json:"session,omitempty"`
	User         User    `json:"user,omitempty"`
}

type TOTPsRecoveryCodesParams

type TOTPsRecoveryCodesParams struct {
	UserID string `json:"user_id"`
}

type TOTPsRecoveryCodesResponse

type TOTPsRecoveryCodesResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	TOTPs      []TOTP `json:"totps,omitempty"`
}

type User

type User struct {
	UserID                string                 `json:"user_id,omitempty"`
	Name                  Name                   `json:"name,omitempty"`
	Emails                []Email                `json:"emails,omitempty"`
	PhoneNumbers          []PhoneNumber          `json:"phone_numbers,omitempty"`
	WebAuthnRegistrations []WebAuthnRegistration `json:"webauthn_registrations,omitempty"`
	OAuthProviders        []OAuthProvider        `json:"providers,omitempty"`
	TOTPs                 []UserTOTP             `json:"totps,omitempty"`
	Password              Password               `json:"password,omitempty"`
	Status                string                 `json:"status,omitempty"`
	CreatedAt             time.Time              `json:"created_at,omitempty"`
}

type UserTOTP

type UserTOTP struct {
	TOTPID   string `json:"totp_id,omitempty"`
	Verified bool   `json:"verified,omitempty"`
}

type UsersCreateParams

type UsersCreateParams struct {
	Email               string     `json:"email,omitempty"`
	PhoneNumber         string     `json:"phone_number,omitempty"`
	Name                Name       `json:"name,omitempty"`
	CreateUserAsPending bool       `json:"create_user_as_pending,omitempty"`
	Attributes          Attributes `json:"attributes,omitempty"`
}

type UsersCreateResponse

type UsersCreateResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	EmailID    string `json:"email_id,omitempty"`
	PhoneID    string `json:"phone_id,omitempty"`
	Status     string `json:"status,omitempty"`
	User       User   `json:"user,omitempty"`
}

type UsersDeleteBiometricRegistrationResponse added in v5.14.1

type UsersDeleteBiometricRegistrationResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	User       User   `json:"user,omitempty"`
}

type UsersDeleteCryptoWalletResponse

type UsersDeleteCryptoWalletResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	User       User   `json:"user,omitempty"`
}

type UsersDeleteEmailResponse

type UsersDeleteEmailResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	User       User   `json:"user,omitempty"`
}

type UsersDeletePasswordResponse added in v5.13.0

type UsersDeletePasswordResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	User       User   `json:"user,omitempty"`
}

type UsersDeletePhoneNumberResponse

type UsersDeletePhoneNumberResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	User       User   `json:"user,omitempty"`
}

type UsersDeleteResponse

type UsersDeleteResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
}

type UsersDeleteTOTPResponse

type UsersDeleteTOTPResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	User       User   `json:"user,omitempty"`
}

type UsersDeleteWebAuthnRegistrationResponse

type UsersDeleteWebAuthnRegistrationResponse struct {
	RequestID  string `json:"request_id,omitempty"`
	StatusCode int    `json:"status_code,omitempty"`
	UserID     string `json:"user_id,omitempty"`
	User       User   `json:"user,omitempty"`
}

type UsersGetPendingParams

type UsersGetPendingParams struct {
	Limit           int32  `json:"limit,omitempty"`
	StartingAfterID string `json:"starting_after_id,omitempty"`
}

type UsersGetPendingResponse

type UsersGetPendingResponse struct {
	RequestID       string         `json:"request_id,omitempty"`
	StatusCode      int            `json:"status_code,omitempty"`
	Users           []PendingUsers `json:"users,omitempty"`
	HasMore         bool           `json:"has_more,omitempty"`
	StartingAfterID string         `json:"starting_after_id,omitempty"`
	Total           int            `json:"total,omitempty"`
}

type UsersGetResponse

type UsersGetResponse struct {
	RequestID             string                 `json:"request_id,omitempty"`
	StatusCode            int                    `json:"status_code,omitempty"`
	UserID                string                 `json:"user_id,omitempty"`
	Name                  Name                   `json:"name,omitempty"`
	Emails                []Email                `json:"emails,omitempty"`
	PhoneNumbers          []PhoneNumber          `json:"phone_numbers,omitempty"`
	WebAuthnRegistrations []WebAuthnRegistration `json:"webauthn_registrations,omitempty"`
	OAuthProviders        []OAuthProvider        `json:"providers,omitempty"`
	TOTPs                 []UserTOTP             `json:"totps,omitempty"`
	CryptoWallets         []CryptoWallet         `json:"crypto_wallets,omitempty"`
	Status                string                 `json:"status,omitempty"`
	CreatedAt             time.Time              `json:"created_at,omitempty"`
}

type UsersSearchOperator

type UsersSearchOperator string
const (
	UserSearchOperatorOR  UsersSearchOperator = "OR"
	UserSearchOperatorAND UsersSearchOperator = "AND"
)

type UsersSearchParams

type UsersSearchParams struct {
	Limit  int32             `json:"limit,omitempty"`
	Query  *UsersSearchQuery `json:"query,omitempty"`
	Cursor string            `json:"cursor,omitempty"`
}

User Search

type UsersSearchQuery

type UsersSearchQuery struct {
	Operator UsersSearchOperator `json:"operator,omitempty"`
	Operands []json.Marshaler    `json:"operands,omitempty"`
}

type UsersSearchQueryCreatedAtBetweenFilter

type UsersSearchQueryCreatedAtBetweenFilter struct {
	GreaterThan time.Time
	LessThan    time.Time
}

func (UsersSearchQueryCreatedAtBetweenFilter) MarshalJSON

func (q UsersSearchQueryCreatedAtBetweenFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryCreatedAtGreaterThanFilter

type UsersSearchQueryCreatedAtGreaterThanFilter struct {
	CreatedAtGreaterThan time.Time
}

Created At Filters

func (UsersSearchQueryCreatedAtGreaterThanFilter) MarshalJSON

type UsersSearchQueryCreatedAtLessThanFilter

type UsersSearchQueryCreatedAtLessThanFilter struct {
	CreatedAtLessThan time.Time
}

func (UsersSearchQueryCreatedAtLessThanFilter) MarshalJSON

func (q UsersSearchQueryCreatedAtLessThanFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryCryptoWalletAddressFilter

type UsersSearchQueryCryptoWalletAddressFilter struct {
	CryptoWalletAddresses []string
}

func (UsersSearchQueryCryptoWalletAddressFilter) MarshalJSON

type UsersSearchQueryCryptoWalletIDFilter

type UsersSearchQueryCryptoWalletIDFilter struct {
	CryptoWalletIDs []string
}

func (UsersSearchQueryCryptoWalletIDFilter) MarshalJSON

func (q UsersSearchQueryCryptoWalletIDFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryCryptoWalletVerifiedFilter

type UsersSearchQueryCryptoWalletVerifiedFilter struct {
	CryptoWalletVerified bool
}

func (UsersSearchQueryCryptoWalletVerifiedFilter) MarshalJSON

type UsersSearchQueryEmailAddressFilter

type UsersSearchQueryEmailAddressFilter struct {
	EmailAddresses []string
}

func (UsersSearchQueryEmailAddressFilter) MarshalJSON

func (q UsersSearchQueryEmailAddressFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryEmailAddressFuzzyFilter

type UsersSearchQueryEmailAddressFuzzyFilter struct {
	EmailAddressFuzzy string
}

func (UsersSearchQueryEmailAddressFuzzyFilter) MarshalJSON

func (q UsersSearchQueryEmailAddressFuzzyFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryEmailIDFilter

type UsersSearchQueryEmailIDFilter struct {
	EmailIDs []string
}

func (UsersSearchQueryEmailIDFilter) MarshalJSON

func (q UsersSearchQueryEmailIDFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryEmailVerifiedFilter

type UsersSearchQueryEmailVerifiedFilter struct {
	EmailVerified bool
}

func (UsersSearchQueryEmailVerifiedFilter) MarshalJSON

func (q UsersSearchQueryEmailVerifiedFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryFullNameFuzzyFilter

type UsersSearchQueryFullNameFuzzyFilter struct {
	FullNameFuzzy string
}

func (UsersSearchQueryFullNameFuzzyFilter) MarshalJSON

func (q UsersSearchQueryFullNameFuzzyFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryOAuthProviderFilter

type UsersSearchQueryOAuthProviderFilter struct {
	OAuthProviders []string
}

func (UsersSearchQueryOAuthProviderFilter) MarshalJSON

func (q UsersSearchQueryOAuthProviderFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryPasswordExistsFilter added in v5.8.0

type UsersSearchQueryPasswordExistsFilter struct {
	PasswordExists bool
}

func (UsersSearchQueryPasswordExistsFilter) MarshalJSON added in v5.8.0

func (q UsersSearchQueryPasswordExistsFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryPhoneIDFilter

type UsersSearchQueryPhoneIDFilter struct {
	PhoneIDs []string
}

func (UsersSearchQueryPhoneIDFilter) MarshalJSON

func (q UsersSearchQueryPhoneIDFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryPhoneNumberFilter

type UsersSearchQueryPhoneNumberFilter struct {
	PhoneNumbers []string
}

func (UsersSearchQueryPhoneNumberFilter) MarshalJSON

func (q UsersSearchQueryPhoneNumberFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryPhoneNumberFuzzyFilter

type UsersSearchQueryPhoneNumberFuzzyFilter struct {
	PhoneNumberFuzzy string
}

func (UsersSearchQueryPhoneNumberFuzzyFilter) MarshalJSON

func (q UsersSearchQueryPhoneNumberFuzzyFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryPhoneVerifiedFilter

type UsersSearchQueryPhoneVerifiedFilter struct {
	PhoneVerified bool
}

func (UsersSearchQueryPhoneVerifiedFilter) MarshalJSON

func (q UsersSearchQueryPhoneVerifiedFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryStatusFilter

type UsersSearchQueryStatusFilter struct {
	Status string
}

User Filters

func (UsersSearchQueryStatusFilter) MarshalJSON

func (q UsersSearchQueryStatusFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryTOTPIDFilter

type UsersSearchQueryTOTPIDFilter struct {
	TOTPIDs []string
}

func (UsersSearchQueryTOTPIDFilter) MarshalJSON

func (q UsersSearchQueryTOTPIDFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryTOTPVerifiedFilter

type UsersSearchQueryTOTPVerifiedFilter struct {
	TOTPVerified bool
}

func (UsersSearchQueryTOTPVerifiedFilter) MarshalJSON

func (q UsersSearchQueryTOTPVerifiedFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryUserIDFilter

type UsersSearchQueryUserIDFilter struct {
	UserIDs []string
}

func (UsersSearchQueryUserIDFilter) MarshalJSON

func (q UsersSearchQueryUserIDFilter) MarshalJSON() ([]byte, error)

type UsersSearchQueryWebAuthnRegistrationIDFilter

type UsersSearchQueryWebAuthnRegistrationIDFilter struct {
	WebAuthnRegistrationIDs []string
}

func (UsersSearchQueryWebAuthnRegistrationIDFilter) MarshalJSON

type UsersSearchQueryWebAuthnRegistrationVerifiedFilter

type UsersSearchQueryWebAuthnRegistrationVerifiedFilter struct {
	WebAuthnRegistrationVerified bool
}

func (UsersSearchQueryWebAuthnRegistrationVerifiedFilter) MarshalJSON

type UsersSearchResponse

type UsersSearchResponse struct {
	RequestID       string `json:"request_id,omitempty"`
	StatusCode      int    `json:"status_code,omitempty"`
	Results         []User `json:"results,omitempty"`
	ResultsMetadata struct {
		NextCursor string `json:"next_cursor,omitempty"`
		Total      int    `json:"total,omitempty"`
	} `json:"results_metadata,omitempty"`
}

type UsersUpdateParams

type UsersUpdateParams struct {
	Name          Name                 `json:"name,omitempty"`
	Emails        []EmailString        `json:"emails,omitempty"`
	PhoneNumbers  []PhoneNumberString  `json:"phone_numbers,omitempty"`
	CryptoWallets []CryptoWalletString `json:"crypto_wallets,omitempty"`
	Attributes    Attributes           `json:"attributes,omitempty"`
}

type UsersUpdateResponse

type UsersUpdateResponse struct {
	RequestID     string         `json:"request_id,omitempty"`
	StatusCode    int            `json:"status_code,omitempty"`
	UserID        string         `json:"user_id,omitempty"`
	Emails        []Email        `json:"emails,omitempty"`
	PhoneNumbers  []PhoneNumber  `json:"phone_numbers,omitempty"`
	CryptoWallets []CryptoWallet `json:"crypto_wallets,omitempty"`
	User          User           `json:"user,omitempty"`
}

type WebAuthnAuthenticateParams

type WebAuthnAuthenticateParams struct {
	PublicKeyCredential    string                 `json:"public_key_credential,omitempty"`
	SessionToken           string                 `json:"session_token,omitempty"`
	SessionJWT             string                 `json:"session_jwt,omitempty"`
	SessionDurationMinutes int32                  `json:"session_duration_minutes,omitempty"`
	SessionCustomClaims    map[string]interface{} `json:"session_custom_claims,omitempty"`
}

type WebAuthnAuthenticateResponse

type WebAuthnAuthenticateResponse struct {
	RequestID              string  `json:"request_id,omitempty"`
	StatusCode             int     `json:"status_code,omitempty"`
	UserID                 string  `json:"user_id,omitempty"`
	WebAuthnRegistrationID string  `json:"webauthn_registration_id,omitempty"`
	SessionToken           string  `json:"session_token,omitempty"`
	SessionJWT             string  `json:"session_jwt,omitempty"`
	Session                Session `json:"session,omitempty"`
	User                   User    `json:"user,omitempty"`
}

type WebAuthnAuthenticateStartParams

type WebAuthnAuthenticateStartParams struct {
	UserID string `json:"user_id,omitempty"`
	Domain string `json:"domain,omitempty"`
}

type WebAuthnAuthenticateStartResponse

type WebAuthnAuthenticateStartResponse struct {
	RequestID                         string `json:"request_id,omitempty"`
	StatusCode                        int    `json:"status_code,omitempty"`
	UserID                            string `json:"user_id,omitempty"`
	PublicKeyCredentialRequestOptions string `json:"public_key_credential_request_options,omitempty"`
}

type WebAuthnFactor

type WebAuthnFactor struct {
	WebAuthnRegistrationID string `json:"webauthn_registration_id,omitempty"`
	Domain                 string `json:"domain,omitempty"`
	UserAgent              string `json:"user_agent,omitempty"`
}

type WebAuthnRegisterParams

type WebAuthnRegisterParams struct {
	UserID              string `json:"user_id,omitempty"`
	PublicKeyCredential string `json:"public_key_credential,omitempty"`
}

type WebAuthnRegisterResponse

type WebAuthnRegisterResponse struct {
	RequestID              string `json:"request_id,omitempty"`
	StatusCode             int    `json:"status_code,omitempty"`
	UserID                 string `json:"user_id,omitempty"`
	WebAuthnRegistrationID string `json:"webauthn_registration_id,omitempty"`
}

type WebAuthnRegisterStartParams

type WebAuthnRegisterStartParams struct {
	UserID            string `json:"user_id,omitempty"`
	Domain            string `json:"domain,omitempty"`
	UserAgent         string `json:"user_agent,omitempty"`
	AuthenticatorType string `json:"authenticator_type,omitempty"`
}

type WebAuthnRegisterStartResponse

type WebAuthnRegisterStartResponse struct {
	RequestID                          string `json:"request_id,omitempty"`
	StatusCode                         int    `json:"status_code,omitempty"`
	UserID                             string `json:"user_id,omitempty"`
	PublicKeyCredentialCreationOptions string `json:"public_key_credential_creation_options,omitempty"`
}

type WebAuthnRegistration

type WebAuthnRegistration struct {
	WebAuthnRegistrationID string `json:"webauthn_registration_id,omitempty"`
	Domain                 string `json:"domain,omitempty"`
	UserAgent              string `json:"user_agent,omitempty"`
	Verified               bool   `json:"verified,omitempty"`
	AuthenticatorType      string `json:"authenticator_type,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL