login_models

package
v1.0.32 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DIRECTIVE_Redirect                               = "redirect"
	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"`
	VERB        string             `json:"verb"`
	FormParams  []models.FormParam `json:"formParams"`
}

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"`
}

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"`
	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