commons

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecryptKeysFromSessionOptions

type DecryptKeysFromSessionOptions struct {
	Password string `json:"password"`
	Session  map[string]interface{}
}

type GenerateQRResponse

type GenerateQRResponse struct {
	Secret string `json:"secret"`
	Image  string `json:"image"`
}

type MFAType

type MFAType string
const TOTP MFAType = "totp"

type NhostSession

type NhostSession struct {
	AccessToken  string `json:"accessToken"`
	RefreshToken string `json:"refreshToken"`
}

type NhostSigninResponse

type NhostSigninResponse struct {
	MFA     map[string]interface{} `json:"mfa"`
	Session map[string]interface{} `json:"session"`
}

type SigninRequestOptions

type SigninRequestOptions struct {
	Email    string `json:"email,omitempty"`
	OTP      string `json:"otp,omitempty"`
	Ticket   string `json:"ticket,omitempty"`
	Password string `json:"password,omitempty"`
}

type SigninResponse

type SigninResponse struct {
	MFA     map[string]interface{} `json:"mfa"`
	Session map[string]interface{} `json:"session"`
	Keys    map[string]string      `json:"keys"`
}

type SigninWithMFAOptions

type SigninWithMFAOptions struct {
	OTP    string `json:"otp"`
	Ticket string `json:"ticket"`
}

func (*SigninWithMFAOptions) JSONMarshal

func (o *SigninWithMFAOptions) JSONMarshal() ([]byte, error)

Custom marshaller for the SigninWithMFAOptions.

type SigninWithPasswordOptions

type SigninWithPasswordOptions struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type SignupOptions

type SignupOptions struct {
	Email    string `json:"email"`
	Password string `json:"password"`
	Name     string `json:"name"`
}

type ToggleMFAOptions

type ToggleMFAOptions struct {
	Code string `json:"code"`

	//	The value of "null" will deactivate MFA.
	ActiveMFAType MFAType `json:"activeMfaType"`
}

func (*ToggleMFAOptions) JSONMarshal

func (o *ToggleMFAOptions) JSONMarshal() ([]byte, error)

Custom marshaller for the ToggleMFAOptions.

type ToggleMFARequestOptions

type ToggleMFARequestOptions struct {
	Code string `json:"code"`
}

type UpdatePasswordOptions

type UpdatePasswordOptions struct {
	NewPassword string `json:"newPassword,omitempty"`
	OldPassword string `json:"oldPassword,omitempty"`
}

func (*UpdatePasswordOptions) Marshal

func (o *UpdatePasswordOptions) Marshal() ([]byte, error)

Jump to

Keyboard shortcuts

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