shared

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionAccountDelete                          flowpilot.ActionName = "account_delete"
	ActionBack                                   flowpilot.ActionName = "back"
	ActionContinueToPasscodeConfirmation         flowpilot.ActionName = "continue_to_passcode_confirmation"
	ActionContinueToPasscodeConfirmationRecovery flowpilot.ActionName = "continue_to_passcode_confirmation_recovery"
	ActionContinueToPasskeyRegistration          flowpilot.ActionName = "continue_to_passkey_registration"
	ActionContinueToPasswordLogin                flowpilot.ActionName = "continue_to_password_login"
	ActionContinueToPasswordRegistration         flowpilot.ActionName = "continue_to_password_registration"
	ActionContinueWithLoginIdentifier            flowpilot.ActionName = "continue_with_login_identifier"
	ActionEmailCreate                            flowpilot.ActionName = "email_create"
	ActionEmailDelete                            flowpilot.ActionName = "email_delete"
	ActionEmailSetPrimary                        flowpilot.ActionName = "email_set_primary"
	ActionEmailVerify                            flowpilot.ActionName = "email_verify"
	ActionExchangeToken                          flowpilot.ActionName = "exchange_token"
	ActionPasswordDelete                         flowpilot.ActionName = "password_delete"
	ActionPasswordLogin                          flowpilot.ActionName = "password_login"
	ActionPasswordRecovery                       flowpilot.ActionName = "password_recovery"
	ActionPasswordCreate                         flowpilot.ActionName = "password_create"
	ActionPasswordUpdate                         flowpilot.ActionName = "password_update"
	ActionRegisterClientCapabilities             flowpilot.ActionName = "register_client_capabilities"
	ActionRegisterLoginIdentifier                flowpilot.ActionName = "register_login_identifier"
	ActionRegisterPassword                       flowpilot.ActionName = "register_password"
	ActionResendPasscode                         flowpilot.ActionName = "resend_passcode"
	ActionSkip                                   flowpilot.ActionName = "skip"
	ActionThirdPartyOAuth                        flowpilot.ActionName = "thirdparty_oauth"
	ActionUsernameCreate                         flowpilot.ActionName = "username_create"
	ActionUsernameUpdate                         flowpilot.ActionName = "username_update"
	ActionUsernameDelete                         flowpilot.ActionName = "username_delete"
	ActionEmailAddressSet                        flowpilot.ActionName = "email_address_set"
	ActionVerifyPasscode                         flowpilot.ActionName = "verify_passcode"
	ActionWebauthnCredentialCreate               flowpilot.ActionName = "webauthn_credential_create"
	ActionWebauthnCredentialDelete               flowpilot.ActionName = "webauthn_credential_delete"
	ActionWebauthnCredentialRename               flowpilot.ActionName = "webauthn_credential_rename"
	ActionWebauthnGenerateCreationOptions        flowpilot.ActionName = "webauthn_generate_creation_options"
	ActionWebauthnGenerateRequestOptions         flowpilot.ActionName = "webauthn_generate_request_options"
	ActionWebauthnVerifyAssertionResponse        flowpilot.ActionName = "webauthn_verify_assertion_response"
	ActionWebauthnVerifyAttestationResponse      flowpilot.ActionName = "webauthn_verify_attestation_response"
	ActionSessionDelete                          flowpilot.ActionName = "session_delete"
)
View Source
const (
	FlowLogin                flowpilot.FlowName = "login"
	FlowRegistration         flowpilot.FlowName = "registration"
	FlowCapabilities         flowpilot.FlowName = "capabilities"
	FlowProfile              flowpilot.FlowName = "profile"
	FlowCredentialUsage      flowpilot.FlowName = "credential_usage"
	FlowCredentialOnboarding flowpilot.FlowName = "credential_onboarding"
	FlowUserDetails          flowpilot.FlowName = "user_details"
)
View Source
const (
	StashPathEmail                                 = "email"
	StashPathEmailVerified                         = "email_verified"
	StashPathLoginMethod                           = "login_method"
	StashPathNewPassword                           = "new_password"
	StashPathPasscodeEmail                         = "sticky.passcode_email"
	StashPathPasscodeID                            = "sticky.passcode_id"
	StashPathPasscodeTemplate                      = "passcode_template"
	StashPathSkipUserCreation                      = "skip_user_creation"
	StashPathUserHasPassword                       = "user_has_password"
	StashPathUserHasWebauthnCredential             = "user_has_webauthn_credential"
	StashPathUserHasUsername                       = "user_has_username"
	StashPathUserHasEmails                         = "user_has_emails"
	StashPathUserID                                = "user_id"
	StashPathUsername                              = "username"
	StashPathWebauthnAvailable                     = "webauthn_available"
	StashPathWebauthnConditionalMediationAvailable = "webauthn_conditional_mediation_available"
	StashPathWebauthnCredential                    = "webauthn_credential"
	StashPathWebauthnSessionDataID                 = "webauthn_session_data_id"
	StashPathUserIdentification                    = "user_identification"
	StashPathLoginOnboardingScheduled              = "login_onboarding_scheduled"
	StashPathLoginOnboardingCreateEmail            = "login_onboarding_create_email"
)
View Source
const (
	StateError                                 flowpilot.StateName = "error"
	StateLoginInit                             flowpilot.StateName = "login_init"
	StateLoginMethodChooser                    flowpilot.StateName = "login_method_chooser"
	StateLoginPasskey                          flowpilot.StateName = "login_passkey"
	StateLoginPassword                         flowpilot.StateName = "login_password"
	StateLoginPasswordRecovery                 flowpilot.StateName = "login_password_recovery"
	StateOnboardingCreatePasskey               flowpilot.StateName = "onboarding_create_passkey"
	StateCredentialOnboardingChooser           flowpilot.StateName = "credential_onboarding_chooser"
	StateOnboardingVerifyPasskeyAttestation    flowpilot.StateName = "onboarding_verify_passkey_attestation"
	StatePasscodeConfirmation                  flowpilot.StateName = "passcode_confirmation"
	StatePasswordCreation                      flowpilot.StateName = "password_creation"
	StatePreflight                             flowpilot.StateName = "preflight"
	StateProfileAccountDeleted                 flowpilot.StateName = "account_deleted"
	StateProfileInit                           flowpilot.StateName = "profile_init"
	StateProfileWebauthnCredentialVerification flowpilot.StateName = "webauthn_credential_verification"
	StateRegistrationInit                      flowpilot.StateName = "registration_init"
	StateSuccess                               flowpilot.StateName = "success"
	StateThirdParty                            flowpilot.StateName = "thirdparty"
	StateOnboardingEmail                       flowpilot.StateName = "onboarding_email"
	StateOnboardingUsername                    flowpilot.StateName = "onboarding_username"
)
View Source
const (
	CategoryLegal flowpilot.LinkCategory = "legal"
	CategoryOauth flowpilot.LinkCategory = "oauth"
	CategoryOther flowpilot.LinkCategory = "other"
)

Link categories enumeration.

Variables

View Source
var (
	ErrorPasscodeInvalid            = flowpilot.NewFlowError("passcode_invalid", "The passcode is invalid.", http.StatusBadRequest)
	ErrorPasskeyInvalid             = flowpilot.NewFlowError("passkey_invalid", "The passkey is invalid.", http.StatusUnauthorized)
	ErrorPasscodeMaxAttemptsReached = flowpilot.NewFlowError("passcode_max_attempts_reached", "The passcode was entered wrong too many times.", http.StatusUnauthorized)
	ErrorRateLimitExceeded          = flowpilot.NewFlowError("rate_limit_exceeded", "The rate limit has been exceeded.", http.StatusTooManyRequests)
	ErrorNotFound                   = flowpilot.NewFlowError("not_found", "The requested resource was not found.", http.StatusNotFound)
	ErrorUnauthorized               = flowpilot.NewFlowError("unauthorized", "The session is invalid.", http.StatusUnauthorized)
)
View Source
var (
	ErrorEmailAlreadyExists    = flowpilot.NewInputError("email_already_exists", "The email address already exists.")
	ErrorUsernameAlreadyExists = flowpilot.NewInputError("username_already_exists", "The username already exists.")
	ErrorUnknownUsername       = flowpilot.NewInputError("unknown_username_error", "The username is unknown.")
	ErrorInvalidUsername       = flowpilot.NewInputError("invalid_username_error", "The username is invalid.")
)

Functions

func LegalLink(name string, href string) flowpilot.Link

LegalLink creates a new link with legal the category "legal".

func OAuthLink(name string, href string) flowpilot.Link

OAuthLink creates a new link with legal the category "oauth".

func OtherLink(name string, href string) flowpilot.Link

OtherLink creates a new link with legal the category "other".

Types

type Action

type Action struct{}

func (*Action) GetDeps

func (a *Action) GetDeps(c flowpilot.Context) *Dependencies

type Back

type Back struct{}

func (Back) Execute

func (a Back) Execute(c flowpilot.ExecutionContext) error

func (Back) GetDescription

func (a Back) GetDescription() string

func (Back) GetName

func (a Back) GetName() flowpilot.ActionName

func (Back) Initialize

func (a Back) Initialize(c flowpilot.InitializationContext)

type Dependencies

type Dependencies struct {
	Cfg                      config.Config
	HttpContext              echo.Context
	PasscodeService          services.Passcode
	PasswordService          services.Password
	WebauthnService          services.WebauthnService
	SamlService              saml.Service
	Persister                persistence.Persister
	SessionManager           session.Manager
	PasscodeRateLimiter      limiter.Store
	PasswordRateLimiter      limiter.Store
	TokenExchangeRateLimiter limiter.Store
	Tx                       *pop.Connection
	AuthenticatorMetadata    mapper.AuthenticatorMetadata
	AuditLogger              auditlog.Logger
}

type EmailPersistVerifiedStatus

type EmailPersistVerifiedStatus struct {
	Action
}

func (EmailPersistVerifiedStatus) Execute

type ExchangeToken

type ExchangeToken struct {
	Action
}

func (ExchangeToken) Execute

func (ExchangeToken) GetDescription

func (a ExchangeToken) GetDescription() string

func (ExchangeToken) GetName

func (a ExchangeToken) GetName() flowpilot.ActionName

func (ExchangeToken) Initialize

type GenerateOAuthLinks struct {
	Action
}

func (GenerateOAuthLinks) Execute

type GetUserData

type GetUserData struct {
	Action
}

func (GetUserData) Execute

type IssueSession

type IssueSession struct {
	Action
}

func (IssueSession) Execute

type PasswordSave

type PasswordSave struct {
	Action
}

func (PasswordSave) Execute

type Skip

type Skip struct {
	Action
}

func (Skip) Execute

func (a Skip) Execute(c flowpilot.ExecutionContext) error

func (Skip) GetDescription

func (a Skip) GetDescription() string

func (Skip) GetName

func (a Skip) GetName() flowpilot.ActionName

func (Skip) Initialize

func (a Skip) Initialize(c flowpilot.InitializationContext)

type ThirdPartyOAuth

type ThirdPartyOAuth struct {
	Action
}

func (ThirdPartyOAuth) Execute

func (ThirdPartyOAuth) GetDescription

func (a ThirdPartyOAuth) GetDescription() string

func (ThirdPartyOAuth) GetName

func (a ThirdPartyOAuth) GetName() flowpilot.ActionName

func (ThirdPartyOAuth) Initialize

type WebauthnCredentialSave

type WebauthnCredentialSave struct {
	Action
}

func (WebauthnCredentialSave) Execute

Jump to

Keyboard shortcuts

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