epmodels

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 4 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIInterface

type APIInterface struct {
	EmailExistsGET                 *func(email string, options APIOptions, userContext supertokens.UserContext) (EmailExistsGETResponse, error)
	GeneratePasswordResetTokenPOST *func(formFields []TypeFormField, options APIOptions, userContext supertokens.UserContext) (GeneratePasswordResetTokenPOSTResponse, error)
	PasswordResetPOST              *func(formFields []TypeFormField, token string, options APIOptions, userContext supertokens.UserContext) (ResetPasswordPOSTResponse, error)
	SignInPOST                     *func(formFields []TypeFormField, options APIOptions, userContext supertokens.UserContext) (SignInPOSTResponse, error)
	SignUpPOST                     *func(formFields []TypeFormField, options APIOptions, userContext supertokens.UserContext) (SignUpPOSTResponse, error)
}

type APIOptions

type APIOptions struct {
	RecipeImplementation RecipeInterface
	AppInfo              supertokens.NormalisedAppinfo
	Config               TypeNormalisedInput
	RecipeID             string
	Req                  *http.Request
	Res                  http.ResponseWriter
	OtherHandler         http.HandlerFunc
	EmailDelivery        emaildelivery.Ingredient
}

type CreateResetPasswordTokenResponse

type CreateResetPasswordTokenResponse struct {
	OK *struct {
		Token string
	}
	UnknownUserIdError *struct{}
}

type EmailExistsGETResponse

type EmailExistsGETResponse struct {
	OK           *struct{ Exists bool }
	GeneralError *supertokens.GeneralErrorResponse
}

type GeneratePasswordResetTokenPOSTResponse

type GeneratePasswordResetTokenPOSTResponse struct {
	OK           *struct{}
	GeneralError *supertokens.GeneralErrorResponse
}

type NormalisedFormField

type NormalisedFormField struct {
	ID       string
	Validate func(value interface{}) *string
	Optional bool
}

type OverrideStruct

type OverrideStruct struct {
	Functions func(originalImplementation RecipeInterface) RecipeInterface
	APIs      func(originalImplementation APIInterface) APIInterface
}

type PasswordPolicyViolatedError added in v0.12.0

type PasswordPolicyViolatedError struct {
	FailureReason string
}

type RecipeInterface

type RecipeInterface struct {
	SignUp                   *func(email string, password string, userContext supertokens.UserContext) (SignUpResponse, error)
	SignIn                   *func(email string, password string, userContext supertokens.UserContext) (SignInResponse, error)
	GetUserByID              *func(userID string, userContext supertokens.UserContext) (*User, error)
	GetUserByEmail           *func(email string, userContext supertokens.UserContext) (*User, error)
	CreateResetPasswordToken *func(userID string, userContext supertokens.UserContext) (CreateResetPasswordTokenResponse, error)
	ResetPasswordUsingToken  *func(token string, newPassword string, userContext supertokens.UserContext) (ResetPasswordUsingTokenResponse, error)
	UpdateEmailOrPassword    *func(userId string, email *string, password *string, applyPasswordPolicy *bool, userContext supertokens.UserContext) (UpdateEmailOrPasswordResponse, error)
}

type ResetPasswordPOSTResponse added in v0.7.0

type ResetPasswordPOSTResponse struct {
	OK *struct {
		UserId *string
	}
	ResetPasswordInvalidTokenError *struct{}
	GeneralError                   *supertokens.GeneralErrorResponse
}

type ResetPasswordUsingTokenResponse

type ResetPasswordUsingTokenResponse struct {
	OK *struct {
		UserId *string
	}
	ResetPasswordInvalidTokenError *struct{}
}

type SignInPOSTResponse added in v0.5.0

type SignInPOSTResponse struct {
	OK *struct {
		User    User
		Session sessmodels.SessionContainer
	}
	WrongCredentialsError *struct{}
	GeneralError          *supertokens.GeneralErrorResponse
}

type SignInResponse

type SignInResponse struct {
	OK *struct {
		User User
	}
	WrongCredentialsError *struct{}
}

type SignUpPOSTResponse added in v0.5.0

type SignUpPOSTResponse struct {
	OK *struct {
		User    User
		Session sessmodels.SessionContainer
	}
	EmailAlreadyExistsError *struct{}
	GeneralError            *supertokens.GeneralErrorResponse
}

type SignUpResponse

type SignUpResponse struct {
	OK *struct {
		User User
	}
	EmailAlreadyExistsError *struct{}
}

type TypeFormField

type TypeFormField struct {
	ID    string `json:"id"`
	Value string `json:"value"`
}

type TypeInput

type TypeInput struct {
	SignUpFeature                  *TypeInputSignUp
	ResetPasswordUsingTokenFeature *TypeInputResetPasswordUsingTokenFeature
	Override                       *OverrideStruct
	EmailDelivery                  *emaildelivery.TypeInput
}

type TypeInputFormField

type TypeInputFormField struct {
	ID       string
	Validate func(value interface{}) *string
	Optional *bool
}

type TypeInputResetPasswordUsingTokenFeature

type TypeInputResetPasswordUsingTokenFeature struct {
	CreateAndSendCustomEmail func(user User, passwordResetURLWithToken string, userContext supertokens.UserContext) // Deprecated: Use EmailDelivery instead.
}

type TypeInputSignUp

type TypeInputSignUp struct {
	FormFields []TypeInputFormField
}

type TypeNormalisedInput

type TypeNormalisedInput struct {
	SignUpFeature                  TypeNormalisedInputSignUp
	SignInFeature                  TypeNormalisedInputSignIn
	ResetPasswordUsingTokenFeature TypeNormalisedInputResetPasswordUsingTokenFeature
	Override                       OverrideStruct
	GetEmailDeliveryConfig         func(recipeImpl RecipeInterface) emaildelivery.TypeInputWithService
}

type TypeNormalisedInputResetPasswordUsingTokenFeature

type TypeNormalisedInputResetPasswordUsingTokenFeature struct {
	FormFieldsForGenerateTokenForm []NormalisedFormField
	FormFieldsForPasswordResetForm []NormalisedFormField
}

type TypeNormalisedInputSignIn

type TypeNormalisedInputSignIn struct {
	FormFields []NormalisedFormField
}

type TypeNormalisedInputSignUp

type TypeNormalisedInputSignUp struct {
	FormFields []NormalisedFormField
}

type UpdateEmailOrPasswordResponse

type UpdateEmailOrPasswordResponse struct {
	OK                          *struct{}
	UnknownUserIdError          *struct{}
	EmailAlreadyExistsError     *struct{}
	PasswordPolicyViolatedError *PasswordPolicyViolatedError
}

type User

type User struct {
	ID         string `json:"id"`
	Email      string `json:"email"`
	TimeJoined uint64 `json:"timejoined"`
}

Jump to

Keyboard shortcuts

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