mfa

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddAuthenticatorRequest added in v1.11.0

type AddAuthenticatorRequest struct {
	oauth.ClientAuthentication
	// The type of authenticators supported by the client.
	// An array with values "otp" or "oob".
	AuthenticatorTypes []string `json:"authenticator_types"`
	// The type of OOB channels supported by the client.
	// An array with values "auth0", "sms", "voice".
	// Required if authenticator_types include oob.
	OOBChannels []string `json:"oob_channels,omitempty"`
	// The phone number to use for SMS or Voice.
	// Required if oob_channels includes sms or voice.
	PhoneNumber string `json:"phone_number,omitempty"`
}

AddAuthenticatorRequest defines the request body for adding an authenticator.

type AddAuthenticatorResponse added in v1.11.0

type AddAuthenticatorResponse struct {
	// If present, the OOB code that should be presented to the user to verify the authenticator.
	OOBCode string `json:"oob_code,omitempty"`
	// If present, a new recovery code that should be presented to the user to store.
	RecoveryCodes []string `json:"recovery_codes,omitempty"`
	// The URI to generate a QR code for the authenticator.
	BarcodeURI string `json:"barcode_uri,omitempty"`
	// The secret to use for the OTP.
	Secret string `json:"secret,omitempty"`
	// The type of authenticator added.
	AuthenticatorType string `json:"authenticator_type,omitempty"`
	// The OOB channels supported by the authenticator.
	OOBChannels string `json:"oob_channels,omitempty"`
	// The binding method to use when verifying the authenticator.
	BindingMethod string `json:"binding_method,omitempty"`
}

AddAuthenticatorResponse defines the response when adding an authenticator.

type ChallengeRequest

type ChallengeRequest struct {
	oauth.ClientAuthentication
	// The token received from the `mfa_required` error.
	MFAToken string `json:"mfa_token,omitempty"`
	// A whitespace-separated list of the challenges types accepted by your application.
	// Accepted challenge types are "oob" or "otp". Excluding this parameter means that your
	// client application accepts all supported challenge types.
	ChallengeType string `json:"challenge_type,omitempty"`
	// The ID of the authenticator to challenge. You can get the ID by querying the list of
	// available authenticators for the user using `management.User.ListAuthenticationMethods`.
	AuthenticatorID string `json:"authenticator_id,omitempty"`
}

ChallengeRequest defines the request body for requesting an MFA challenge.

type ChallengeResponse

type ChallengeResponse struct {
	// The type of challenge requested.
	ChallengeType string `json:"challenge_type,omitempty"`
	// The OOB code to use when calling `VerifyWithOOBRequest`
	// Only present when `ChallengeType` is "oob".
	OOBCode string `json:"oob_code,omitempty"`
	/// If included, then the user should be prompted for a `BindingCode` which should be included
	// in the `VerifyWithOOBRequest` provided to `VerifyWithOOB`.
	// Only present when `ChallengeType` is "oob".
	BindingMethod string `json:"binding_method,omitempty"`
}

ChallengeResponse defines the response body when requesting an MFA challenge.

type ListAuthenticatorsResponse added in v1.11.0

type ListAuthenticatorsResponse struct {
	ID                string `json:"id,omitempty"`
	AuthenticatorType string `json:"authenticator_type,omitempty"`
	OOBChannels       string `json:"oob_channels,omitempty"`
	Name              string `json:"name,omitempty"`
	Active            bool   `json:"active,omitempty"`
}

ListAuthenticatorsResponse defines the response when listing authenticators.

type VerifyWithOOBRequest

type VerifyWithOOBRequest struct {
	oauth.ClientAuthentication
	MFAToken    string
	OOBCode     string
	BindingCode string
}

VerifyWithOOBRequest defines the request body for verifying an MFA challenge with an OOB challenge.

type VerifyWithOTPRequest

type VerifyWithOTPRequest struct {
	oauth.ClientAuthentication
	MFAToken string
	OTP      string
}

VerifyWithOTPRequest defines the request body for verifying an MFA challenge with OTP.

type VerifyWithRecoveryCodeRequest

type VerifyWithRecoveryCodeRequest struct {
	oauth.ClientAuthentication
	MFAToken     string
	RecoveryCode string
}

VerifyWithRecoveryCodeRequest defines the request body for verifying an MFA challenge with a recovery code.

type VerifyWithRecoveryCodeResponse

type VerifyWithRecoveryCodeResponse struct {
	oauth.TokenSet
	// If present, a new recovery code that should be presented to the user to store.
	RecoveryCode string `json:"recovery_code,omitempty"`
}

VerifyWithRecoveryCodeResponse defines the response when verifying with a recovery code.

Jump to

Keyboard shortcuts

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