login_models

package
v1.6.0-initial-react-ts.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DIRECTIVE_Redirect                               = "redirect"
	DIRECTIVE_StartExternalLogin                     = "startExternalLogin"
	DIRECTIVE_LoginPhaseOne_UserDoesNotExist         = "userDoesNotExist"
	DIRECTIVE_LoginPhaseOne_DisplayPasswordPage      = "displayPasswordPage"
	DIRECTIVE_VerifyCode_DisplayVerifyCodePage       = "displayVerifyCodePage"
	DIRECTIVE_LoginPhaseOne_DisplayPhaseOnePage      = "displayLoginPhaseOnePage"
	DIRECTIVE_PasswordReset_DisplayPasswordResetPage = "displayPasswordResetPage"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectiveDisplayPasswordPage

type DirectiveDisplayPasswordPage struct {
	Email      string `json:"email"`
	HasPasskey bool   `json:"hasPasskey"`
}

type DirectiveEmailCodeChallenge

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

type DirectiveRedirect

type DirectiveRedirect struct {
	RedirectURI string `json:"redirectUri"`
}

type DirectiveStartExternalLogin added in v1.1.0

type DirectiveStartExternalLogin struct {
	Slug string `json:"slug"`
}

type LoginPasswordRequest

type LoginPasswordRequest struct {
	Email    string `json:"email" validate:"required"`
	Password string `json:"password" validate:"required"`
}

type LoginPasswordResponse

type LoginPasswordResponse struct {
	Email                       string                       `json:"email" validate:"required"`
	Directive                   string                       `json:"directive" validate:"required"`
	DirectiveRedirect           *DirectiveRedirect           `json:"directiveRedirect,omitempty"`
	DirectiveEmailCodeChallenge *DirectiveEmailCodeChallenge `json:"directiveEmailCodeChallenge,omitempty"`
}

type LoginPhaseOneRequest

type LoginPhaseOneRequest struct {
	Email string `json:"email" validate:"required"`
}

type LoginPhaseOneResponse

type LoginPhaseOneResponse struct {
	Email                        string                        `json:"email" validate:"required"`
	Directive                    string                        `json:"directive" validate:"required"`
	DirectiveRedirect            *DirectiveRedirect            `json:"directiveRedirect,omitempty"`
	DirectiveDisplayPasswordPage *DirectiveDisplayPasswordPage `json:"directiveDisplayPasswordPage,omitempty"`
	DirectiveEmailCodeChallenge  *DirectiveEmailCodeChallenge  `json:"directiveEmailCodeChallenge,omitempty"`
	DirectiveStartExternalLogin  *DirectiveStartExternalLogin  `json:"directiveStartExternalLogin,omitempty"`
}

type PasswordResetErrorReason

type PasswordResetErrorReason int
const (
	PasswordResetErrorReason_NoError PasswordResetErrorReason = iota
	PasswordResetErrorReason_InvalidPassword
)

type PasswordResetFinishRequest

type PasswordResetFinishRequest struct {
	Password        string `json:"password" validate:"required"`
	PasswordConfirm string `json:"passwordConfirm" validate:"required"`
}

type PasswordResetFinishResponse

type PasswordResetFinishResponse struct {
	Directive   string                   `json:"directive" validate:"required"`
	ErrorReason PasswordResetErrorReason `json:"errorReason,omitempty"`
}

type PasswordResetStartRequest

type PasswordResetStartRequest struct {
	Email string `json:"email" validate:"required"`
}

type PasswordResetStartResponse

type PasswordResetStartResponse struct {
	Email                       string                       `json:"email" validate:"required"`
	Directive                   string                       `json:"directive" validate:"required"`
	DirectiveEmailCodeChallenge *DirectiveEmailCodeChallenge `json:"directiveEmailCodeChallenge,omitempty"`
}

type SignupErrorReason

type SignupErrorReason int
const (
	SignupErrorReason_NoError SignupErrorReason = iota
	SignupErrorReason_InvalidPassword
	SignupErrorReason_UserAlreadyExists
)

type SignupRequest

type SignupRequest struct {
	Email    string `json:"email" validate:"required"`
	Password string `json:"password" validate:"required"`
}

type SignupResponse

type SignupResponse struct {
	Email                       string                       `json:"email" validate:"required"`
	Directive                   string                       `json:"directive" validate:"required"`
	DirectiveRedirect           *DirectiveRedirect           `json:"directiveRedirect,omitempty"`
	DirectiveEmailCodeChallenge *DirectiveEmailCodeChallenge `json:"directiveEmailCodeChallenge,omitempty"`
	DirectiveStartExternalLogin *DirectiveStartExternalLogin `json:"directiveStartExternalLogin,omitempty"`
	Message                     string                       `json:"message,omitempty"`
	ErrorReason                 SignupErrorReason            `json:"errorReason,omitempty"`
}

type VerifyCodeRequest

type VerifyCodeRequest struct {
	Code string `json:"code" validate:"required"`
}

type VerifyCodeResponse

type VerifyCodeResponse struct {
	Directive         string             `json:"directive" validate:"required"`
	DirectiveRedirect *DirectiveRedirect `json:"directiveRedirect,omitempty"`
}

Jump to

Keyboard shortcuts

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