Documentation ¶
Index ¶
- Constants
- type AppleOAuthFactor
- type Argon2Config
- type Attributes
- type AuthenticationFactor
- type AuthenticatorAppFactor
- type BiometricFactor
- type Claims
- type ClaimsWrapper
- type Client
- type CryptoWallet
- type CryptoWalletAuthenticateParams
- type CryptoWalletAuthenticateResponse
- type CryptoWalletAuthenticateStartParams
- type CryptoWalletAuthenticateStartResponse
- type CryptoWalletFactor
- type CryptoWalletString
- type Email
- type EmailFactor
- type EmailString
- type FacebookOAuthFactor
- type Feedback
- type GitLabOAuthFactor
- type GithubOAuthFactor
- type GoogleOAuthFactor
- type HashType
- type JWTAuthenticationFactor
- type Key
- type MD5Config
- type MagicLinksAuthenticateParams
- type MagicLinksAuthenticateResponse
- type MagicLinksCreateParams
- type MagicLinksCreateResponse
- type MagicLinksEmailInviteParams
- type MagicLinksEmailInviteResponse
- type MagicLinksEmailLoginOrCreateParams
- type MagicLinksEmailLoginOrCreateResponse
- type MagicLinksEmailRevokeInviteParams
- type MagicLinksEmailRevokeInviteResponse
- type MagicLinksEmailSendParams
- type MagicLinksEmailSendResponse
- type MicrosoftOAuthFactor
- type Name
- type OAuthAuthenticateParams
- type OAuthAuthenticateResponse
- type OAuthProvider
- type OTPsAuthenticateParams
- type OTPsAuthenticateResponse
- type OTPsEmailLoginOrCreateParams
- type OTPsEmailLoginOrCreateResponse
- type OTPsEmailSendParams
- type OTPsEmailSendResponse
- type OTPsSMSLoginOrCreateParams
- type OTPsSMSLoginOrCreateResponse
- type OTPsSMSSendParams
- type OTPsSMSSendResponse
- type OTPsWhatsAppLoginOrCreateParams
- type OTPsWhatsAppLoginOrCreateResponse
- type OTPsWhatsAppSendParams
- type OTPsWhatsAppSendResponse
- type Options
- type Password
- type PasswordEmailResetParams
- type PasswordEmailResetResponse
- type PasswordEmailResetStartParams
- type PasswordEmailResetStartResponse
- type PasswordExistingPasswordResetParams
- type PasswordExistingPasswordResetResponse
- type PasswordSessionResetParams
- type PasswordSessionResetResponse
- type PasswordsAuthenticateParams
- type PasswordsAuthenticateResponse
- type PasswordsCreateParams
- type PasswordsCreateResponse
- type PasswordsMigrateParams
- type PasswordsMigrateResponse
- type PasswordsStrengthCheckParams
- type PasswordsStrengthCheckResponse
- type PendingUsers
- type PhoneNumber
- type PhoneNumberFactor
- type PhoneNumberString
- type ProviderType
- type ProviderValues
- type RecoveryCodeFactor
- type SHA1Config
- type ScryptConfig
- type Session
- type SessionClaim
- type SessionWrapper
- type SessionsAuthenticateParams
- type SessionsAuthenticateResponse
- type SessionsGetJWKSParams
- type SessionsGetJWKSResponse
- type SessionsGetParams
- type SessionsGetResponse
- type SessionsRevokeParams
- type SessionsRevokeResponse
- type TOTP
- type TOTPsAuthenticateParams
- type TOTPsAuthenticateResponse
- type TOTPsCreateParams
- type TOTPsCreateResponse
- type TOTPsRecoverParams
- type TOTPsRecoverResponse
- type TOTPsRecoveryCodesParams
- type TOTPsRecoveryCodesResponse
- type User
- type UserTOTP
- type UsersCreateParams
- type UsersCreateResponse
- type UsersDeleteCryptoWalletResponse
- type UsersDeleteEmailResponse
- type UsersDeletePasswordResponse
- type UsersDeletePhoneNumberResponse
- type UsersDeleteResponse
- type UsersDeleteTOTPResponse
- type UsersDeleteWebAuthnRegistrationResponse
- type UsersGetPendingParams
- type UsersGetPendingResponse
- type UsersGetResponse
- type UsersSearchOperator
- type UsersSearchParams
- type UsersSearchQuery
- type UsersSearchQueryCreatedAtBetweenFilter
- type UsersSearchQueryCreatedAtGreaterThanFilter
- type UsersSearchQueryCreatedAtLessThanFilter
- type UsersSearchQueryCryptoWalletAddressFilter
- type UsersSearchQueryCryptoWalletIDFilter
- type UsersSearchQueryCryptoWalletVerifiedFilter
- type UsersSearchQueryEmailAddressFilter
- type UsersSearchQueryEmailAddressFuzzyFilter
- type UsersSearchQueryEmailIDFilter
- type UsersSearchQueryEmailVerifiedFilter
- type UsersSearchQueryFullNameFuzzyFilter
- type UsersSearchQueryOAuthProviderFilter
- type UsersSearchQueryPasswordExistsFilter
- type UsersSearchQueryPhoneIDFilter
- type UsersSearchQueryPhoneNumberFilter
- type UsersSearchQueryPhoneNumberFuzzyFilter
- type UsersSearchQueryPhoneVerifiedFilter
- type UsersSearchQueryStatusFilter
- type UsersSearchQueryTOTPIDFilter
- type UsersSearchQueryTOTPVerifiedFilter
- type UsersSearchQueryUserIDFilter
- type UsersSearchQueryWebAuthnRegistrationIDFilter
- type UsersSearchQueryWebAuthnRegistrationVerifiedFilter
- type UsersSearchResponse
- type UsersUpdateParams
- type UsersUpdateResponse
- type WebAuthnAuthenticateParams
- type WebAuthnAuthenticateResponse
- type WebAuthnAuthenticateStartParams
- type WebAuthnAuthenticateStartResponse
- type WebAuthnFactor
- type WebAuthnRegisterParams
- type WebAuthnRegisterResponse
- type WebAuthnRegisterStartParams
- type WebAuthnRegisterStartResponse
- type WebAuthnRegistration
Constants ¶
const ( EnvTest = config.EnvTest EnvLive = config.EnvLive )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppleOAuthFactor ¶
type Argon2Config ¶ added in v5.11.0
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 ¶
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 ¶
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 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 CryptoWalletFactor ¶
type CryptoWalletString ¶
type EmailFactor ¶
type EmailString ¶
type EmailString struct {
Email string `json:"email,omitempty"`
}
type FacebookOAuthFactor ¶
type GitLabOAuthFactor ¶
type GithubOAuthFactor ¶
type GoogleOAuthFactor ¶
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 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 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 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 MagicLinksEmailRevokeInviteParams ¶
type MagicLinksEmailRevokeInviteParams struct {
Email string `json:"email"`
}
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"` }
MAGIC LINK - EMAIL
type MicrosoftOAuthFactor ¶
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 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 OTPsEmailSendParams ¶
type OTPsEmailSendParams struct { Email string `json:"email"` ExpirationMinutes int32 `json:"expiration_minutes,omitempty"` Attributes Attributes `json:"attributes,omitempty"` }
OTP - Email
type OTPsEmailSendResponse ¶
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 OTPsSMSSendParams ¶
type OTPsSMSSendParams struct { PhoneNumber string `json:"phone_number"` ExpirationMinutes int32 `json:"expiration_minutes,omitempty"` Attributes Attributes `json:"attributes,omitempty"` }
OTP - SMS
type OTPsSMSSendResponse ¶
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 OTPsWhatsAppSendParams ¶
type OTPsWhatsAppSendParams struct { PhoneNumber string `json:"phone_number"` ExpirationMinutes int32 `json:"expiration_minutes,omitempty"` Attributes Attributes `json:"attributes,omitempty"` }
OTP - WhatsApp
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 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 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 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 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 PasswordsStrengthCheckParams ¶ added in v5.8.0
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 PhoneNumberFactor ¶
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 RecoveryCodeFactor ¶
type RecoveryCodeFactor struct {
TOTPRecoveryCodeID string `json:"totp_recovery_code_id,omitempty"`
}
type SHA1Config ¶ added in v5.13.0
type ScryptConfig ¶ added in v5.13.0
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 SessionsGetJWKSParams ¶
type SessionsGetJWKSParams struct {
ProjectID string `json:"project_id"`
}
type SessionsGetJWKSResponse ¶
type SessionsGetParams ¶
type SessionsGetParams struct {
UserID string `json:"user_id"`
}
type SessionsGetResponse ¶
type SessionsRevokeParams ¶
type SessionsRevokeResponse ¶
type SessionsRevokeResponse struct {
RequestID string `json:"request_id,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 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 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 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 UsersDeletePasswordResponse ¶ added in v5.13.0
type UsersDeleteResponse ¶
type UsersDeleteTOTPResponse ¶
type UsersGetPendingParams ¶
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 ¶
func (UsersSearchQueryCreatedAtBetweenFilter) MarshalJSON ¶
func (q UsersSearchQueryCreatedAtBetweenFilter) MarshalJSON() ([]byte, error)
type UsersSearchQueryCreatedAtGreaterThanFilter ¶
Created At Filters
func (UsersSearchQueryCreatedAtGreaterThanFilter) MarshalJSON ¶
func (q UsersSearchQueryCreatedAtGreaterThanFilter) MarshalJSON() ([]byte, error)
type UsersSearchQueryCreatedAtLessThanFilter ¶
func (UsersSearchQueryCreatedAtLessThanFilter) MarshalJSON ¶
func (q UsersSearchQueryCreatedAtLessThanFilter) MarshalJSON() ([]byte, error)
type UsersSearchQueryCryptoWalletAddressFilter ¶
type UsersSearchQueryCryptoWalletAddressFilter struct {
CryptoWalletAddresses []string
}
func (UsersSearchQueryCryptoWalletAddressFilter) MarshalJSON ¶
func (q UsersSearchQueryCryptoWalletAddressFilter) MarshalJSON() ([]byte, error)
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 ¶
func (q UsersSearchQueryCryptoWalletVerifiedFilter) MarshalJSON() ([]byte, error)
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 ¶
func (q UsersSearchQueryWebAuthnRegistrationIDFilter) MarshalJSON() ([]byte, error)
type UsersSearchQueryWebAuthnRegistrationVerifiedFilter ¶
type UsersSearchQueryWebAuthnRegistrationVerifiedFilter struct {
WebAuthnRegistrationVerified bool
}
func (UsersSearchQueryWebAuthnRegistrationVerifiedFilter) MarshalJSON ¶
func (q UsersSearchQueryWebAuthnRegistrationVerifiedFilter) MarshalJSON() ([]byte, error)
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 WebAuthnFactor ¶
type WebAuthnRegisterParams ¶
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"` }