webapp

package
v0.0.0-...-122f59b Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 81 Imported by: 0

Documentation

Index

Constants

View Source
const LoginLinkOTPPageQueryStateKey = "state"
View Source
const (
	VerifyIdentityActionSubmit = "submit"
)
View Source
const (
	// WebsocketMessageKindRefresh means when the client receives this message, they should refresh the page.
	WebsocketMessageKindRefresh = "refresh"
)
View Source
const WechatActionCallback = "callback"

Variables

View Source
var AddOrUpdateLoginIDSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"q_login_id_input_type": { "type": "string" },
			"q_login_id_key": { "type": "string" },
			"q_login_id_type": { "type": "string" },
			"q_login_id": { "type": "string" }
		},
		"required": ["q_login_id_input_type", "q_login_id_key", "q_login_id_type", "q_login_id"]
	}
`)
View Source
var AuthflowChangePasswordSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_new_password": { "type": "string" }
		},
		"required": ["x_new_password"]
	}
`)
View Source
var AuthflowCreatePasswordSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_password": { "type": "string" },
			"x_confirm_password": { "type": "string" }
		},
		"required": ["x_password", "x_confirm_password"]
	}
`)
View Source
var AuthflowEnterOOBOTPSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_code": {
				"type": "string",
				"format": "x_oob_otp_code"
			}
		},
		"required": ["x_code"]
	}
`)
View Source
var AuthflowEnterPasswordSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_password": { "type": "string" }
		},
		"required": ["x_password"]
	}
`)
View Source
var AuthflowEnterRecoveryCodeSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_recovery_code": {
				"type": "string",
				"format": "x_recovery_code"
			}
		},
		"required": ["x_recovery_code"]
	}
`)
View Source
var AuthflowEnterTOTPSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_code": { "type": "string" }
		},
		"required": ["x_code"]
	}
`)
View Source
var AuthflowForgotPasswordOTPSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_code": {
				"type": "string",
				"format": "x_oob_otp_code"
			}
		},
		"required": ["x_code"]
	}
`)
View Source
var AuthflowForgotPasswordSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_login_id": { "type": "string" },
			"x_login_id_type": { "type": "string", "enum": ["phone", "email"] }
		},
		"required": ["x_login_id", "x_login_id_type"]
	}
`)
View Source
var AuthflowLoginLoginIDSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_login_id": { "type": "string" },
			"x_login_id_input_type": { "type": "string" }
		},
		"required": ["x_login_id", "x_login_id_input_type"]
	}
`)
View Source
var AuthflowPromoteLoginIDSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"q_login_id_key": { "type": "string" },
			"q_login_id": { "type": "string" }
		},
		"required": ["q_login_id_key", "q_login_id"]
	}
`)
View Source
var AuthflowResetPasswordSchema = validation.NewSimpleSchema(`
{
  "type": "object",
  "properties": {
    "x_password": { "type": "string" },
    "x_confirm_password": { "type": "string" }
  },
  "required": ["x_password", "x_confirm_password"]
}
`)
View Source
var AuthflowSetupOOBOTPSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_target": { "type": "string" }
		},
		"required": ["x_target"]
	}
`)
View Source
var AuthflowSetupTOTPSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_code": { "type": "string" }
		},
		"required": ["x_code"]
	}
`)
View Source
var AuthflowSignupLoginIDSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"q_login_id_key": { "type": "string" },
			"q_login_id": { "type": "string" }
		},
		"required": ["q_login_id_key", "q_login_id"]
	}
`)
View Source
var AuthflowWhatsappOTPSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_code": {
				"type": "string",
				"format": "x_oob_otp_code"
			}
		},
		"required": ["x_code"]
	}
`)
View Source
var Components = web.ComponentsHTML
View Source
var ConfirmTerminateOtherSessionsSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_response": { "type": "string" }
		},
		"required": ["x_response"]
	}
`)
View Source
var CreatePasswordSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_password": { "type": "string" },
			"x_confirm_password": { "type": "string" },
			"x_stage": { "type": "string" }
		},
		"required": ["x_password", "x_confirm_password", "x_stage"]
	}
`)
View Source
var DependencySet = wire.NewSet(
	wire.Struct(new(AuthEntryPointMiddleware), "*"),
	wire.Struct(new(ImplementationSwitcherMiddleware), "*"),

	wire.Struct(new(ResponseRenderer), "*"),
	wire.Struct(new(FormPrefiller), "*"),
	wire.Bind(new(Renderer), new(*ResponseRenderer)),

	wire.Struct(new(ControllerDeps), "*"),
	wire.Struct(new(ControllerFactory), "*"),

	wire.Struct(new(AuthflowController), "*"),
	NewAuthflowControllerLogger,

	NewPublisher,
	wire.Struct(new(GlobalSessionServiceFactory), "*"),

	NewPanicMiddlewareLogger,
	wire.Struct(new(PanicMiddleware), "*"),

	wire.Struct(new(AppStaticAssetsHandler), "*"),

	wire.Struct(new(RootHandler), "*"),
	wire.Struct(new(OAuthEntrypointHandler), "*"),
	wire.Struct(new(LoginHandler), "*"),
	wire.Struct(new(SignupHandler), "*"),
	wire.Struct(new(PromoteHandler), "*"),
	wire.Struct(new(ReauthHandler), "*"),
	wire.Struct(new(SelectAccountHandler), "*"),
	wire.Struct(new(SSOCallbackHandler), "*"),
	wire.Struct(new(EnterLoginIDHandler), "*"),
	wire.Struct(new(EnterPasswordHandler), "*"),
	wire.Struct(new(ConfirmTerminateOtherSessionsHandler), "*"),
	wire.Struct(new(UsePasskeyHandler), "*"),
	wire.Struct(new(CreatePasswordHandler), "*"),
	wire.Struct(new(CreatePasskeyHandler), "*"),
	wire.Struct(new(PromptCreatePasskeyHandler), "*"),
	wire.Struct(new(SetupTOTPHandler), "*"),
	wire.Struct(new(EnterTOTPHandler), "*"),
	wire.Struct(new(SetupOOBOTPHandler), "*"),
	wire.Struct(new(EnterOOBOTPHandler), "*"),
	wire.Struct(new(SetupWhatsappOTPHandler), "*"),
	wire.Struct(new(WhatsappOTPHandler), "*"),
	wire.Struct(new(SetupLoginLinkOTPHandler), "*"),
	wire.Struct(new(LoginLinkOTPHandler), "*"),
	wire.Struct(new(VerifyLoginLinkOTPHandler), "*"),
	wire.Struct(new(EnterRecoveryCodeHandler), "*"),
	wire.Struct(new(SetupRecoveryCodeHandler), "*"),
	wire.Struct(new(VerifyIdentityHandler), "*"),
	wire.Struct(new(VerifyIdentitySuccessHandler), "*"),
	wire.Struct(new(ForgotPasswordHandler), "*"),
	wire.Struct(new(ForgotPasswordSuccessHandler), "*"),
	wire.Struct(new(ResetPasswordHandler), "*"),
	wire.Struct(new(ResetPasswordSuccessHandler), "*"),
	wire.Struct(new(SettingsHandler), "*"),
	wire.Struct(new(TesterHandler), "*"),
	wire.Struct(new(SettingsProfileHandler), "*"),
	wire.Struct(new(SettingsProfileEditHandler), "*"),
	wire.Struct(new(SettingsIdentityHandler), "*"),
	wire.Struct(new(SettingsBiometricHandler), "*"),
	wire.Struct(new(SettingsMFAHandler), "*"),
	wire.Struct(new(SettingsTOTPHandler), "*"),
	wire.Struct(new(SettingsOOBOTPHandler), "*"),
	wire.Struct(new(SettingsRecoveryCodeHandler), "*"),
	wire.Struct(new(SettingsSessionsHandler), "*"),
	wire.Struct(new(ForceChangePasswordHandler), "*"),
	wire.Struct(new(SettingsChangePasswordHandler), "*"),
	wire.Struct(new(ForceChangeSecondaryPasswordHandler), "*"),
	wire.Struct(new(SettingsChangeSecondaryPasswordHandler), "*"),
	wire.Struct(new(SettingsDeleteAccountHandler), "*"),
	wire.Struct(new(SettingsDeleteAccountSuccessHandler), "*"),
	wire.Struct(new(SettingsPasskeyHandler), "*"),
	wire.Struct(new(AccountStatusHandler), "*"),
	wire.Struct(new(LogoutHandler), "*"),
	wire.Struct(new(ReturnHandler), "*"),
	wire.Struct(new(ErrorHandler), "*"),
	wire.Struct(new(NotFoundHandler), "*"),
	wire.Struct(new(WebsocketHandler), "*"),
	wire.Struct(new(WechatAuthHandler), "*"),
	wire.Struct(new(WechatCallbackHandler), "*"),
	wire.Struct(new(PasskeyCreationOptionsHandler), "*"),
	wire.Struct(new(PasskeyRequestOptionsHandler), "*"),
	wire.Struct(new(ConnectWeb3AccountHandler), "*"),
	wire.Struct(new(MissingWeb3WalletHandler), "*"),
	wire.Struct(new(FeatureDisabledHandler), "*"),

	wire.Struct(new(AuthflowLoginHandler), "*"),
	wire.Struct(new(AuthflowSignupHandler), "*"),
	wire.Struct(new(AuthflowPromoteHandler), "*"),
	wire.Struct(new(AuthflowReauthHandler), "*"),
	wire.Struct(new(AuthflowEnterPasswordHandler), "*"),
	wire.Struct(new(AuthflowEnterOOBOTPHandler), "*"),
	wire.Struct(new(AuthflowCreatePasswordHandler), "*"),
	wire.Struct(new(AuthflowEnterTOTPHandler), "*"),
	wire.Struct(new(AuthflowSetupTOTPHandler), "*"),
	wire.Struct(new(AuthflowViewRecoveryCodeHandler), "*"),
	wire.Struct(new(AuthflowWhatsappOTPHandler), "*"),
	wire.Struct(new(AuthflowOOBOTPLinkHandler), "*"),
	wire.Struct(new(AuthflowChangePasswordHandler), "*"),
	wire.Struct(new(AuthflowUsePasskeyHandler), "*"),
	wire.Struct(new(AuthflowPromptCreatePasskeyHandler), "*"),
	wire.Struct(new(AuthflowEnterRecoveryCodeHandler), "*"),
	wire.Struct(new(AuthflowSetupOOBOTPHandler), "*"),
	wire.Struct(new(AuthflowTerminateOtherSessionsHandler), "*"),
	wire.Struct(new(AuthflowWechatHandler), "*"),
	wire.Struct(new(AuthflowForgotPasswordHandler), "*"),
	wire.Struct(new(AuthflowForgotPasswordOTPHandler), "*"),
	wire.Struct(new(AuthflowForgotPasswordSuccessHandler), "*"),
	wire.Struct(new(AuthflowResetPasswordHandler), "*"),
	wire.Struct(new(AuthflowResetPasswordSuccessHandler), "*"),
	wire.Struct(new(AuthflowAccountStatusHandler), "*"),
	wire.Struct(new(AuthflowNoAuthenticatorHandler), "*"),
	wire.Struct(new(AuthflowFinishFlowHandler), "*"),

	wire.Struct(new(ResponseWriter), "*"),
)
View Source
var EnterOOBOTPSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_oob_otp_code": {
				"type": "string",
				"format": "x_oob_otp_code"
			}
		},
		"required": ["x_oob_otp_code"]
	}
`)
View Source
var EnterPasswordSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_password": { "type": "string" },
			"x_stage": { "type": "string" }
		},
		"required": ["x_password", "x_stage"]
	}
`)
View Source
var EnterRecoveryCodeSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_recovery_code": {
				"type": "string",
				"format": "x_recovery_code"
			}
		},
		"required": ["x_recovery_code"]
	}
`)
View Source
var EnterTOTPSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_totp_code": {
				"type": "string",
				"format": "x_totp_code"
			}
		},
		"required": ["x_totp_code"]
	}
`)
View Source
var ErrNoFallbackAvailable = fmt.Errorf("webapp: no fallback is available")
View Source
var ForceChangePasswordSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_new_password": { "type": "string" },
			"x_confirm_password": { "type": "string" }
		},
		"required": ["x_new_password", "x_confirm_password"]
	}
`)
View Source
var ForceChangeSecondaryPasswordSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_new_password": { "type": "string" },
			"x_confirm_password": { "type": "string" }
		},
		"required": ["x_new_password", "x_confirm_password"]
	}
`)
View Source
var ForgotPasswordSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"q_login_id_input_type": { "type": "string", "enum": ["email", "phone", "text"] },
			"q_login_id": { "type": "string" }
		},
		"required": ["q_login_id_input_type", "q_login_id"]
	}
`)
View Source
var LoginWithLoginIDSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"q_login_id_input_type": { "type": "string", "enum": ["email", "phone", "text"] },
			"q_login_id": { "type": "string" }
		},
		"required": ["q_login_id_input_type", "q_login_id"]
	}
`)
View Source
var PasskeyAutofillSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_assertion_response": { "type": "string" }
		},
		"required": ["x_assertion_response"]
	}
`)
View Source
var PromoteWithLoginIDSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"q_login_id_key": { "type": "string" },
			"q_login_id_type": { "type": "string" },
			"q_login_id_input_type": { "type": "string", "enum": ["email", "phone", "text"] },
			"q_login_id": { "type": "string" }
		},
		"required": ["q_login_id_key", "q_login_id_type", "q_login_id_input_type", "q_login_id"]
	}
`)
View Source
var RemoveLoginIDSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"q_identity_id": { "type": "string" }
		},
		"required": ["q_identity_id"]
	}
`)
View Source
var ResetPasswordSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"code": { "type": "string" },
			"x_password": { "type": "string" },
			"x_confirm_password": { "type": "string" }
		},
		"required": ["code", "x_password", "x_confirm_password"]
	}
`)
View Source
var SettingsChangePasswordSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_old_password": { "type": "string" },
			"x_new_password": { "type": "string" },
			"x_confirm_password": { "type": "string" }
		},
		"required": ["x_old_password", "x_new_password", "x_confirm_password"]
	}
`)
View Source
var SettingsChangeSecondaryPasswordSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_old_password": { "type": "string" },
			"x_new_password": { "type": "string" },
			"x_confirm_password": { "type": "string" }
		},
		"required": ["x_old_password", "x_new_password", "x_confirm_password"]
	}
`)
View Source
var SetupLoginLinkOTPEmailSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_email": { "type": "string" }
		},
		"required": ["x_email"]
	}
`)
View Source
var SetupOOBOTPEmailSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_email": { "type": "string" }
		},
		"required": ["x_email"]
	}
`)
View Source
var SetupOOBOTPSMSSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_e164": { "type": "string" }
		},
		"required": ["x_e164"]
	}
`)
View Source
var SetupTOTPSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_totp_code": {
				"type": "string",
				"format": "x_totp_code"
			}
		},
		"required": ["x_totp_code"]
	}
`)
View Source
var SetupWhatsappOTPSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_e164": { "type": "string" }
		},
		"required": ["x_e164"]
	}
`)
View Source
var SignupWithLoginIDSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"q_login_id_key": { "type": "string" },
			"q_login_id_type": { "type": "string" },
			"q_login_id_input_type": { "type": "string", "enum": ["email", "phone", "text"] },
			"q_login_id": { "type": "string" }
		},
		"required": ["q_login_id_key", "q_login_id_type", "q_login_id_input_type", "q_login_id"]
	}
`)
View Source
var TemplateRequireOAuth = template.RegisterHTML(
	"web/require_oauth.html",
	Components...,
)
View Source
var TemplateTurboErrorHTML = template.RegisterHTML(
	"web/turbo_error.html",
	Components...,
)
View Source
var TemplateV2WebFatalErrorHTML = template.RegisterHTML(
	"web/authflowv2/fatal_error.html",
	Components...,
)

NOTE: To resolve import cycle in panic_middleware.go, put it here as workaround

View Source
var TemplateWebAccountStatusHTML = template.RegisterHTML(
	"web/account_status.html",
	Components...,
)
View Source
var TemplateWebAuthflowAccountStatusHTML = template.RegisterHTML(
	"web/authflow_account_status.html",
	Components...,
)
View Source
var TemplateWebAuthflowChangePasswordHTML = template.RegisterHTML(
	"web/authflow_change_password.html",
	Components...,
)
View Source
var TemplateWebAuthflowCreatePasswordHTML = template.RegisterHTML(
	"web/authflow_create_password.html",
	Components...,
)
View Source
var TemplateWebAuthflowEnterOOBOTPHTML = template.RegisterHTML(
	"web/authflow_enter_oob_otp.html",
	Components...,
)
View Source
var TemplateWebAuthflowEnterPasswordHTML = template.RegisterHTML(
	"web/authflow_enter_password.html",
	Components...,
)
View Source
var TemplateWebAuthflowEnterRecoveryCodeHTML = template.RegisterHTML(
	"web/authflow_enter_recovery_code.html",
	Components...,
)
View Source
var TemplateWebAuthflowEnterTOTPHTML = template.RegisterHTML(
	"web/authflow_enter_totp.html",
	Components...,
)
View Source
var TemplateWebAuthflowForgotPasswordGenericOTPHTML = template.RegisterHTML(
	"web/authflow_forgot_password_generic_otp.html",
	Components...,
)
View Source
var TemplateWebAuthflowForgotPasswordHTML = template.RegisterHTML(
	"web/authflow_forgot_password.html",
	Components...,
)
View Source
var TemplateWebAuthflowForgotPasswordSuccessHTML = template.RegisterHTML(
	"web/authflow_forgot_password_success.html",
	Components...,
)
View Source
var TemplateWebAuthflowForgotPasswordWhatsappOTPHTML = template.RegisterHTML(
	"web/authflow_forgot_password_whatsapp_otp.html",
	Components...,
)
View Source
var TemplateWebAuthflowLoginHTML = template.RegisterHTML(
	"web/authflow_login.html",
	Components...,
)
View Source
var TemplateWebAuthflowNoAuthenticatorHTML = template.RegisterHTML(
	"web/authflow_no_authenticator.html",
	Components...,
)
View Source
var TemplateWebAuthflowOOBOTPLinkHTML = template.RegisterHTML(
	"web/authflow_oob_otp_link.html",
	Components...,
)
View Source
var TemplateWebAuthflowPromoteHTML = template.RegisterHTML(
	"web/authflow_promote.html",
	Components...,
)
View Source
var TemplateWebAuthflowPromptCreatePasskeyHTML = template.RegisterHTML(
	"web/authflow_prompt_create_passkey.html",
	Components...,
)
View Source
var TemplateWebAuthflowResetPasswordHTML = template.RegisterHTML(
	"web/authflow_reset_password.html",
	Components...,
)
View Source
var TemplateWebAuthflowResetPasswordSuccessHTML = template.RegisterHTML(
	"web/authflow_reset_password_success.html",
	Components...,
)
View Source
var TemplateWebAuthflowSetupOOBOTPHTML = template.RegisterHTML(
	"web/authflow_setup_oob_otp.html",
	Components...,
)
View Source
var TemplateWebAuthflowSetupTOTPHTML = template.RegisterHTML(
	"web/authflow_setup_totp.html",
	Components...,
)
View Source
var TemplateWebAuthflowSignupHTML = template.RegisterHTML(
	"web/authflow_signup.html",
	Components...,
)
View Source
var TemplateWebAuthflowTerminateOtherSessionsHTML = template.RegisterHTML(
	"web/authflow_terminate_other_sessions.html",
	Components...,
)
View Source
var TemplateWebAuthflowUsePasskeyHTML = template.RegisterHTML(
	"web/authflow_use_passkey.html",
	Components...,
)
View Source
var TemplateWebAuthflowViewRecoveryCodeHTML = template.RegisterHTML(
	"web/authflow_view_recovery_code.html",
	Components...,
)
View Source
var TemplateWebAuthflowWechatHTML = template.RegisterHTML(
	"web/authflow_wechat.html",
	Components...,
)
View Source
var TemplateWebAuthflowWhatsappOTPHTML = template.RegisterHTML(
	"web/authflow_whatsapp_otp.html",
	Components...,
)
View Source
var TemplateWebChangePasswordHTML = template.RegisterHTML(
	"web/change_password.html",
	Components...,
)
View Source
var TemplateWebChangeSecondaryPasswordHTML = template.RegisterHTML(
	"web/change_secondary_password.html",
	Components...,
)
View Source
var TemplateWebConfirmTerminateOtherSessionsHTML = template.RegisterHTML(
	"web/confirm_terminate_other_sessions.html",
	Components...,
)
View Source
var TemplateWebConnectWeb3AccountHTML = template.RegisterHTML(
	"web/connect_web3_account.html",
	Components...,
)
View Source
var TemplateWebConsentHTML = template.RegisterHTML(
	"web/consent.html",
	Components...,
)
View Source
var TemplateWebCreatePasskeyHTML = template.RegisterHTML(
	"web/create_passkey.html",
	Components...,
)
View Source
var TemplateWebCreatePasswordHTML = template.RegisterHTML(
	"web/create_password.html",
	Components...,
)
View Source
var TemplateWebDownloadRecoveryCodeTXT = template.RegisterPlainText(
	"web/download_recovery_code.txt",
	plainTextComponents...,
)
View Source
var TemplateWebEnterLoginIDHTML = template.RegisterHTML(
	"web/enter_login_id.html",
	Components...,
)
View Source
var TemplateWebEnterOOBOTPHTML = template.RegisterHTML(
	"web/enter_oob_otp.html",
	Components...,
)
View Source
var TemplateWebEnterPasswordHTML = template.RegisterHTML(
	"web/enter_password.html",
	Components...,
)
View Source
var TemplateWebEnterRecoveryCodeHTML = template.RegisterHTML(
	"web/enter_recovery_code.html",
	Components...,
)
View Source
var TemplateWebEnterTOTPHTML = template.RegisterHTML(
	"web/enter_totp.html",
	Components...,
)
View Source
var TemplateWebFatalErrorHTML = template.RegisterHTML(
	"web/fatal_error.html",
	Components...,
)
View Source
var TemplateWebFeatureDisabledHTML = template.RegisterHTML(
	"web/error_feature_disabled.html",
	Components...,
)
View Source
var TemplateWebForgotPasswordHTML = template.RegisterHTML(
	"web/forgot_password.html",
	Components...,
)
View Source
var TemplateWebForgotPasswordSuccessHTML = template.RegisterHTML(
	"web/forgot_password_success.html",
	Components...,
)
View Source
var TemplateWebLoginHTML = template.RegisterHTML(
	"web/login.html",
	Components...,
)
View Source
var TemplateWebLoginLinkHTML = template.RegisterHTML(
	"web/login_link_otp.html",
	Components...,
)
View Source
var TemplateWebLogoutHTML = template.RegisterHTML(
	"web/logout.html",
	Components...,
)
View Source
var TemplateWebMissingWeb3WalletHTML = template.RegisterHTML(
	"web/missing_web3_wallet.html",
	Components...,
)
View Source
var TemplateWebNotFoundHTML = template.RegisterHTML(
	"web/not_found.html",
	Components...,
)
View Source
var TemplateWebPromoteHTML = template.RegisterHTML(
	"web/promote.html",
	Components...,
)
View Source
var TemplateWebPromptCreatePasskeyHTML = template.RegisterHTML(
	"web/prompt_create_passkey.html",
	Components...,
)
View Source
var TemplateWebResetPasswordHTML = template.RegisterHTML(
	"web/reset_password.html",
	Components...,
)
View Source
var TemplateWebResetPasswordSuccessHTML = template.RegisterHTML(
	"web/reset_password_success.html",
	Components...,
)
View Source
var TemplateWebReturnHTML = template.RegisterHTML(
	"web/return.html",
	Components...,
)
View Source
var TemplateWebSelectAccountHTML = template.RegisterHTML(
	"web/select_account.html",
	Components...,
)
View Source
var TemplateWebSettingsAnonymousUserHTML = template.RegisterHTML(
	"web/settings_anonymous_user.html",
	Components...,
)
View Source
var TemplateWebSettingsBiometricHTML = template.RegisterHTML(
	"web/settings_biometric.html",
	Components...,
)
View Source
var TemplateWebSettingsDeleteAccountHTML = template.RegisterHTML(
	"web/settings_delete_account.html",
	Components...,
)
View Source
var TemplateWebSettingsDeleteAccountSuccessHTML = template.RegisterHTML(
	"web/settings_delete_account_success.html",
	Components...,
)
View Source
var TemplateWebSettingsHTML = template.RegisterHTML(
	"web/settings.html",
	Components...,
)
View Source
var TemplateWebSettingsIdentityHTML = template.RegisterHTML(
	"web/settings_identity.html",
	Components...,
)
View Source
var TemplateWebSettingsMFAHTML = template.RegisterHTML(
	"web/settings_mfa.html",
	Components...,
)
View Source
var TemplateWebSettingsOOBOTPHTML = template.RegisterHTML(
	"web/settings_oob_otp.html",
	Components...,
)
View Source
var TemplateWebSettingsPasskeyHTML = template.RegisterHTML(
	"web/settings_passkey.html",
	Components...,
)
View Source
var TemplateWebSettingsProfileEditHTML = template.RegisterHTML(
	"web/settings_profile_edit.html",
	Components...,
)
View Source
var TemplateWebSettingsProfileHTML = template.RegisterHTML(
	"web/settings_profile.html",
	Components...,
)
View Source
var TemplateWebSettingsRecoveryCodeHTML = template.RegisterHTML(
	"web/settings_recovery_code.html",
	Components...,
)
View Source
var TemplateWebSettingsSessionsHTML = template.RegisterHTML(
	"web/settings_sessions.html",
	Components...,
)
View Source
var TemplateWebSettingsTOTPHTML = template.RegisterHTML(
	"web/settings_totp.html",
	Components...,
)
View Source
var TemplateWebSetupLoginLinkOTPHTML = template.RegisterHTML(
	"web/setup_login_link_otp.html",
	Components...,
)
View Source
var TemplateWebSetupOOBOTPHTML = template.RegisterHTML(
	"web/setup_oob_otp.html",
	Components...,
)
View Source
var TemplateWebSetupRecoveryCodeHTML = template.RegisterHTML(
	"web/setup_recovery_code.html",
	Components...,
)
View Source
var TemplateWebSetupTOTPHTML = template.RegisterHTML(
	"web/setup_totp.html",
	Components...,
)
View Source
var TemplateWebSetupWhatsappOTPHTML = template.RegisterHTML(
	"web/setup_whatsapp_otp.html",
	Components...,
)
View Source
var TemplateWebSignupHTML = template.RegisterHTML(
	"web/signup.html",
	Components...,
)
View Source
var TemplateWebTesterHTML = template.RegisterHTML(
	"web/tester.html",
	Components...,
)
View Source
var TemplateWebUsePasskeyHTML = template.RegisterHTML(
	"web/use_passkey.html",
	Components...,
)
View Source
var TemplateWebVerifyIdentityHTML = template.RegisterHTML(
	"web/verify_identity.html",
	Components...,
)
View Source
var TemplateWebVerifyIdentitySuccessHTML = template.RegisterHTML(
	"web/verify_identity_success.html",
	Components...,
)
View Source
var TemplateWebVerifyLoginLinkOTPHTML = template.RegisterHTML(
	"web/verify_login_link.html",
	Components...,
)
View Source
var TemplateWebWechatAuthHandlerHTML = template.RegisterHTML(
	"web/wechat_auth.html",
	Components...,
)
View Source
var TemplateWebWhatsappHTML = template.RegisterHTML(
	"web/whatsapp_otp.html",
	Components...,
)
View Source
var TesterScopes = []string{
	"openid", "offline_access", oauth.FullAccessScope,
}
View Source
var VerifyIdentitySchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_verification_code": {
				"type": "string",
				"format": "x_verification_code"
			}
		},
		"required": ["x_verification_code"]
	}
`)
View Source
var VerifyLoginLinkOTPSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_oob_otp_code": { "type": "string" }
		},
		"required": ["x_oob_otp_code"]
	}
`)
View Source
var Web3AccountConfirmationSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_siwe_message": { "type": "string" },
			"x_siwe_signature": { "type": "string" }
		},
		"required": ["x_siwe_message", "x_siwe_signature"]
	}
`)

Functions

func ConfigureAccountStatusRoute

func ConfigureAccountStatusRoute(route httproute.Route) httproute.Route

func ConfigureAppStaticAssetsRoute

func ConfigureAppStaticAssetsRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowAccountStatusRoute

func ConfigureAuthflowAccountStatusRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowChangePasswordRoute

func ConfigureAuthflowChangePasswordRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowCreatePasswordRoute

func ConfigureAuthflowCreatePasswordRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowEnterOOBOTPRoute

func ConfigureAuthflowEnterOOBOTPRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowEnterPasswordRoute

func ConfigureAuthflowEnterPasswordRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowEnterRecoveryCodeRoute

func ConfigureAuthflowEnterRecoveryCodeRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowEnterTOTPRoute

func ConfigureAuthflowEnterTOTPRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowFinishFlowRoute

func ConfigureAuthflowFinishFlowRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowForgotPasswordOTPRoute

func ConfigureAuthflowForgotPasswordOTPRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowForgotPasswordRoute

func ConfigureAuthflowForgotPasswordRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowForgotPasswordSuccessRoute

func ConfigureAuthflowForgotPasswordSuccessRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowLoginRoute

func ConfigureAuthflowLoginRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowNoAuthenticatorRoute

func ConfigureAuthflowNoAuthenticatorRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowOOBOTPLinkRoute

func ConfigureAuthflowOOBOTPLinkRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowPromoteRoute

func ConfigureAuthflowPromoteRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowPromptCreatePasskeyRoute

func ConfigureAuthflowPromptCreatePasskeyRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowReauthRoute

func ConfigureAuthflowReauthRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowResetPasswordRoute

func ConfigureAuthflowResetPasswordRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowResetPasswordSuccessRoute

func ConfigureAuthflowResetPasswordSuccessRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowSetupOOBOTPRoute

func ConfigureAuthflowSetupOOBOTPRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowSetupTOTPRoute

func ConfigureAuthflowSetupTOTPRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowSignupRoute

func ConfigureAuthflowSignupRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowTerminateOtherSessionsRoute

func ConfigureAuthflowTerminateOtherSessionsRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowUsePasskeyRoute

func ConfigureAuthflowUsePasskeyRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowViewRecoveryCodeRoute

func ConfigureAuthflowViewRecoveryCodeRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowWechatRoute

func ConfigureAuthflowWechatRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowWhatsappOTPRoute

func ConfigureAuthflowWhatsappOTPRoute(route httproute.Route) httproute.Route

func ConfigureConfirmTerminateOtherSessionsRoute

func ConfigureConfirmTerminateOtherSessionsRoute(route httproute.Route) httproute.Route

func ConfigureConnectWeb3AccountRoute

func ConfigureConnectWeb3AccountRoute(route httproute.Route) httproute.Route

func ConfigureCreatePasskeyRoute

func ConfigureCreatePasskeyRoute(route httproute.Route) httproute.Route

func ConfigureCreatePasswordRoute

func ConfigureCreatePasswordRoute(route httproute.Route) httproute.Route

func ConfigureEnterLoginIDRoute

func ConfigureEnterLoginIDRoute(route httproute.Route) httproute.Route

func ConfigureEnterOOBOTPRoute

func ConfigureEnterOOBOTPRoute(route httproute.Route) httproute.Route

func ConfigureEnterPasswordRoute

func ConfigureEnterPasswordRoute(route httproute.Route) httproute.Route

func ConfigureEnterRecoveryCodeRoute

func ConfigureEnterRecoveryCodeRoute(route httproute.Route) httproute.Route

func ConfigureEnterTOTPRoute

func ConfigureEnterTOTPRoute(route httproute.Route) httproute.Route

func ConfigureErrorRoute

func ConfigureErrorRoute(route httproute.Route) httproute.Route

func ConfigureFeatureDisabledRoute

func ConfigureFeatureDisabledRoute(route httproute.Route) httproute.Route

func ConfigureForceChangePasswordRoute

func ConfigureForceChangePasswordRoute(route httproute.Route) httproute.Route

func ConfigureForceChangeSecondaryPasswordRoute

func ConfigureForceChangeSecondaryPasswordRoute(route httproute.Route) httproute.Route

func ConfigureForgotPasswordRoute

func ConfigureForgotPasswordRoute(route httproute.Route) httproute.Route

func ConfigureForgotPasswordSuccessRoute

func ConfigureForgotPasswordSuccessRoute(route httproute.Route) httproute.Route

func ConfigureGeneratedStaticAssetsRoute

func ConfigureGeneratedStaticAssetsRoute(route httproute.Route) httproute.Route

func ConfigureLoginLinkOTPRoute

func ConfigureLoginLinkOTPRoute(route httproute.Route) httproute.Route

func ConfigureLoginRoute

func ConfigureLoginRoute(route httproute.Route) httproute.Route

func ConfigureLogoutRoute

func ConfigureLogoutRoute(route httproute.Route) httproute.Route

func ConfigureMissingWeb3WalletRoute

func ConfigureMissingWeb3WalletRoute(route httproute.Route) httproute.Route

func ConfigureOAuthEntrypointRoute

func ConfigureOAuthEntrypointRoute(route httproute.Route) httproute.Route

func ConfigurePasskeyCreationOptionsRoute

func ConfigurePasskeyCreationOptionsRoute(route httproute.Route) httproute.Route

func ConfigurePasskeyRequestOptionsRoute

func ConfigurePasskeyRequestOptionsRoute(route httproute.Route) httproute.Route

func ConfigurePromoteRoute

func ConfigurePromoteRoute(route httproute.Route) httproute.Route

func ConfigurePromptCreatePasskeyRoute

func ConfigurePromptCreatePasskeyRoute(route httproute.Route) httproute.Route

func ConfigureReauthRoute

func ConfigureReauthRoute(route httproute.Route) httproute.Route

func ConfigureResetPasswordRoute

func ConfigureResetPasswordRoute(route httproute.Route) httproute.Route

func ConfigureResetPasswordSuccessRoute

func ConfigureResetPasswordSuccessRoute(route httproute.Route) httproute.Route

func ConfigureReturnRoute

func ConfigureReturnRoute(route httproute.Route) httproute.Route

func ConfigureRootRoute

func ConfigureRootRoute(route httproute.Route) httproute.Route

func ConfigureSSOCallbackRoute

func ConfigureSSOCallbackRoute(route httproute.Route) httproute.Route

func ConfigureSelectAccountRoute

func ConfigureSelectAccountRoute(route httproute.Route) httproute.Route

func ConfigureSettingsBiometricRoute

func ConfigureSettingsBiometricRoute(route httproute.Route) httproute.Route

func ConfigureSettingsChangePasswordRoute

func ConfigureSettingsChangePasswordRoute(route httproute.Route) httproute.Route

func ConfigureSettingsChangeSecondaryPasswordRoute

func ConfigureSettingsChangeSecondaryPasswordRoute(route httproute.Route) httproute.Route

func ConfigureSettingsDeleteAccountRoute

func ConfigureSettingsDeleteAccountRoute(route httproute.Route) httproute.Route

func ConfigureSettingsDeleteAccountSuccessRoute

func ConfigureSettingsDeleteAccountSuccessRoute(route httproute.Route) httproute.Route

func ConfigureSettingsIdentityRoute

func ConfigureSettingsIdentityRoute(route httproute.Route) httproute.Route

func ConfigureSettingsMFARoute

func ConfigureSettingsMFARoute(route httproute.Route) httproute.Route

func ConfigureSettingsOOBOTPRoute

func ConfigureSettingsOOBOTPRoute(route httproute.Route) httproute.Route

func ConfigureSettingsPasskeyRoute

func ConfigureSettingsPasskeyRoute(route httproute.Route) httproute.Route

func ConfigureSettingsProfileEditRoute

func ConfigureSettingsProfileEditRoute(route httproute.Route) httproute.Route

func ConfigureSettingsProfileRoute

func ConfigureSettingsProfileRoute(route httproute.Route) httproute.Route

func ConfigureSettingsRecoveryCodeRoute

func ConfigureSettingsRecoveryCodeRoute(route httproute.Route) httproute.Route

func ConfigureSettingsRoute

func ConfigureSettingsRoute(route httproute.Route) httproute.Route

func ConfigureSettingsSessionsRoute

func ConfigureSettingsSessionsRoute(route httproute.Route) httproute.Route

func ConfigureSettingsTOTPRoute

func ConfigureSettingsTOTPRoute(route httproute.Route) httproute.Route

func ConfigureSetupLoginLinkOTPRoute

func ConfigureSetupLoginLinkOTPRoute(route httproute.Route) httproute.Route

func ConfigureSetupOOBOTPRoute

func ConfigureSetupOOBOTPRoute(route httproute.Route) httproute.Route

func ConfigureSetupRecoveryCodeRoute

func ConfigureSetupRecoveryCodeRoute(route httproute.Route) httproute.Route

func ConfigureSetupTOTPRoute

func ConfigureSetupTOTPRoute(route httproute.Route) httproute.Route

func ConfigureSetupWhatsappOTPRoute

func ConfigureSetupWhatsappOTPRoute(route httproute.Route) httproute.Route

func ConfigureSignupRoute

func ConfigureSignupRoute(route httproute.Route) httproute.Route

func ConfigureTesterRoute

func ConfigureTesterRoute(route httproute.Route) httproute.Route

func ConfigureUsePasskeyRoute

func ConfigureUsePasskeyRoute(route httproute.Route) httproute.Route

func ConfigureVerifyIdentityRoute

func ConfigureVerifyIdentityRoute(route httproute.Route) httproute.Route

func ConfigureVerifyIdentitySuccessRoute

func ConfigureVerifyIdentitySuccessRoute(route httproute.Route) httproute.Route

func ConfigureVerifyLoginLinkOTPRoute

func ConfigureVerifyLoginLinkOTPRoute(route httproute.Route) httproute.Route

func ConfigureWebsocketRoute

func ConfigureWebsocketRoute(route httproute.Route) httproute.Route

func ConfigureWechatAuthRoute

func ConfigureWechatAuthRoute(route httproute.Route) httproute.Route

func ConfigureWechatCallbackRoute

func ConfigureWechatCallbackRoute(route httproute.Route) httproute.Route

func ConfigureWhatsappOTPRoute

func ConfigureWhatsappOTPRoute(route httproute.Route) httproute.Route

func CreateQRCodeImage

func CreateQRCodeImage(content string, width int, height int, level qr.ErrorCorrectionLevel) (image.Image, error)

func DeriveFlowName

func DeriveFlowName(flowType authflow.FlowType, flowGroup string, clientAllowlist *config.AuthenticationFlowAllowlist, definedGroups []*config.UIAuthenticationFlowGroup) (string, error)

func FindLoginIDInPreviousInput

func FindLoginIDInPreviousInput(s *webapp.Session, xStep string) (string, bool)

func FormToJSON

func FormToJSON(form url.Values) map[string]interface{}

func FormToLoginLinkTarget

func FormToLoginLinkTarget(form url.Values) (target string, err error)

func FormToOOBTarget

func FormToOOBTarget(oobAuthenticatorType model.AuthenticatorType, form url.Values) (target string, inputType string, err error)

func FormatRecoveryCodes

func FormatRecoveryCodes(recoveryCodes []string) []string

func GetUIImplementation

func GetUIImplementation(ctx context.Context) config.UIImplementation

func GetValidationSchema

func GetValidationSchema(oobAuthenticatorType model.AuthenticatorType) *validation.SimpleSchema

func GetXStepFromQuery

func GetXStepFromQuery(r *http.Request) string

func IdentitiesDisplayName

func IdentitiesDisplayName(identities []*identity.Info) string

func JSONPointerFormToMap

func JSONPointerFormToMap(form url.Values) map[string]string

func PatchGenderForm

func PatchGenderForm(form url.Values)

func SetRecoveryCodeAttachmentHeaders

func SetRecoveryCodeAttachmentHeaders(w http.ResponseWriter)

func WebsocketChannelName

func WebsocketChannelName(appID string, id string) string

func WithUIImplementation

func WithUIImplementation(ctx context.Context, impl config.UIImplementation) context.Context

Types

type AccountStatusHandler

type AccountStatusHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
}

func (*AccountStatusHandler) GetData

func (h *AccountStatusHandler) GetData(r *http.Request, rw http.ResponseWriter, graph *interaction.Graph) (map[string]interface{}, error)

func (*AccountStatusHandler) ServeHTTP

func (h *AccountStatusHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type AdvanceOptions

type AdvanceOptions struct {
	// Treat the next screen as the extend of the taken branch
	// Allowing alternative branches to be selected based on the current state
	InheritTakenBranchState bool
}

type AnonymousUserPromotionService

type AnonymousUserPromotionService interface {
	ConvertLoginHintToInput(loginHintString string) (*webapp.AnonymousTokenInput, error)
}

type AppStaticAssetsHandler

type AppStaticAssetsHandler struct {
	Resources ResourceManager
}

func (*AppStaticAssetsHandler) Open

func (h *AppStaticAssetsHandler) Open(name string) (http.File, error)

func (*AppStaticAssetsHandler) ServeHTTP

type AuthEntryPointMiddleware

type AuthEntryPointMiddleware struct {
	BaseViewModel       *viewmodels.BaseViewModeler
	Renderer            Renderer
	AppHostSuffixes     config.AppHostSuffixes
	TrustProxy          config.TrustProxy
	OAuthConfig         *config.OAuthConfig
	UIConfig            *config.UIConfig
	OAuthClientResolver WebappOAuthClientResolver
}

func (*AuthEntryPointMiddleware) Handle

type AuthFlowForgotPasswordViewModel

type AuthFlowForgotPasswordViewModel struct {
	LoginIDInputType    ForgotPasswordLoginIDInputType
	LoginID             string
	PhoneLoginIDEnabled bool
	EmailLoginIDEnabled bool
	LoginIDDisabled     bool
	OTPForm             string
}

func NewAuthFlowForgotPasswordViewModel

func NewAuthFlowForgotPasswordViewModel(
	r *http.Request,
	initialScreen *webapp.AuthflowScreenWithFlowResponse,
	selectDestinationScreen *webapp.AuthflowScreenWithFlowResponse) AuthFlowForgotPasswordViewModel

type AuthenticationBeginNode

type AuthenticationBeginNode interface {
	GetAuthenticationEdges() ([]interaction.Edge, error)
	GetAuthenticationStage() authn.AuthenticationStage
}

type AuthenticationFlowWebsocketEventStore

type AuthenticationFlowWebsocketEventStore interface {
	Publish(websocketChannelName string, e authflow.Event) error
}

type AuthflowAccountStatusHandler

type AuthflowAccountStatusHandler struct {
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowAccountStatusHandler) ServeHTTP

type AuthflowChangePasswordHandler

type AuthflowChangePasswordHandler struct {
	Controller              *AuthflowController
	BaseViewModel           *viewmodels.BaseViewModeler
	ChangePasswordViewModel *viewmodels.ChangePasswordViewModeler
	Renderer                Renderer
}

func (*AuthflowChangePasswordHandler) GetData

func (*AuthflowChangePasswordHandler) ServeHTTP

type AuthflowController

type AuthflowController struct {
	Logger                  AuthflowControllerLogger
	TesterEndpointsProvider tester.EndpointsProvider
	ErrorCookie             *webapp.ErrorCookie
	TrustProxy              config.TrustProxy
	Clock                   clock.Clock

	Cookies        AuthflowControllerCookieManager
	Sessions       AuthflowControllerSessionStore
	SessionCookie  webapp.SessionCookieDef
	SignedUpCookie webapp.SignedUpCookieDef

	Authflows AuthflowControllerAuthflowService

	OAuthSessions  AuthflowControllerOAuthSessionService
	UIInfoResolver AuthflowControllerUIInfoResolver

	UIConfig            *config.UIConfig
	OAuthClientResolver AuthflowControllerOAuthClientResolver

	Navigator AuthflowNavigator
}

func (*AuthflowController) AdvanceToDelayedScreen

func (c *AuthflowController) AdvanceToDelayedScreen(r *http.Request, s *webapp.Session) (*webapp.Result, error)

func (*AuthflowController) AdvanceWithInput

func (c *AuthflowController) AdvanceWithInput(
	r *http.Request,
	s *webapp.Session,
	screen0 *webapp.AuthflowScreenWithFlowResponse,
	input map[string]interface{},
	options *AdvanceOptions,
) (result *webapp.Result, err error)

AdvanceWithInput is same as AdvanceWithInputs but only allow one input.

func (*AuthflowController) AdvanceWithInputs

func (c *AuthflowController) AdvanceWithInputs(
	r *http.Request,
	s *webapp.Session,
	screen0 *webapp.AuthflowScreenWithFlowResponse,
	inputs []map[string]interface{},
	options *AdvanceOptions,
) (*webapp.Result, error)

AdvanceWithInputs is for feeding multiple inputs that would advance the flow.

func (*AuthflowController) DelayScreen

func (c *AuthflowController) DelayScreen(r *http.Request,
	s *webapp.Session,
	sourceScreen *webapp.AuthflowScreen,
	targetResult *webapp.Result,
) (*webapp.AuthflowScreen, error)

func (*AuthflowController) FeedInputWithoutNavigate

func (c *AuthflowController) FeedInputWithoutNavigate(stateToken string, input interface{}) (*authflow.ServiceOutput, error)

func (*AuthflowController) Finish

func (*AuthflowController) GetScreen

func (*AuthflowController) HandleOAuthCallback

func (c *AuthflowController) HandleOAuthCallback(w http.ResponseWriter, r *http.Request, callbackResponse AuthflowOAuthCallbackResponse)

func (*AuthflowController) HandleResumeOfFlow

func (c *AuthflowController) HandleResumeOfFlow(
	w http.ResponseWriter,
	r *http.Request,
	opts webapp.SessionOptions,
	handlers *AuthflowControllerHandlers,
	input map[string]interface{},
	errorHandler *AuthflowControllerErrorHandler,
)

func (*AuthflowController) HandleStartOfFlow

func (c *AuthflowController) HandleStartOfFlow(
	w http.ResponseWriter,
	r *http.Request,
	opts webapp.SessionOptions,
	flowType authflow.FlowType,
	handlers *AuthflowControllerHandlers,
	input interface{})

func (*AuthflowController) HandleStep

func (*AuthflowController) HandleWithoutFlow

func (c *AuthflowController) HandleWithoutFlow(w http.ResponseWriter, r *http.Request, handlers *AuthflowControllerHandlers)

func (*AuthflowController) RedirectURI

func (c *AuthflowController) RedirectURI(r *http.Request) string

func (*AuthflowController) ReplaceScreen

func (c *AuthflowController) ReplaceScreen(r *http.Request, s *webapp.Session, flowType authflow.FlowType, input map[string]interface{}) (result *webapp.Result, err error)

ReplaceScreen is for switching flow.

func (*AuthflowController) Restart

func (c *AuthflowController) Restart(s *webapp.Session) (result *webapp.Result, err error)

func (*AuthflowController) UpdateWithInput

func (c *AuthflowController) UpdateWithInput(r *http.Request, s *webapp.Session, screen *webapp.AuthflowScreenWithFlowResponse, input map[string]interface{}) (result *webapp.Result, err error)

UpdateWithInput is for feeding an input that would just update the current node. One application is resend.

type AuthflowControllerAuthflowService

type AuthflowControllerAuthflowService interface {
	CreateNewFlow(intent authflow.PublicFlow, sessionOptions *authflow.SessionOptions) (*authflow.ServiceOutput, error)
	Get(stateToken string) (*authflow.ServiceOutput, error)
	FeedInput(stateToken string, rawMessage json.RawMessage) (*authflow.ServiceOutput, error)
}

type AuthflowControllerCookieManager

type AuthflowControllerCookieManager interface {
	GetCookie(r *http.Request, def *httputil.CookieDef) (*http.Cookie, error)
	ValueCookie(def *httputil.CookieDef, value string) *http.Cookie
	ClearCookie(def *httputil.CookieDef) *http.Cookie
}

type AuthflowControllerErrorHandler

type AuthflowControllerErrorHandler func(w http.ResponseWriter, r *http.Request, err error) error

type AuthflowControllerHandler

type AuthflowControllerHandler func(s *webapp.Session, screen *webapp.AuthflowScreenWithFlowResponse) error

type AuthflowControllerHandlers

type AuthflowControllerHandlers struct {
	GetHandler   AuthflowControllerHandler
	PostHandlers map[string]AuthflowControllerHandler
}

func (*AuthflowControllerHandlers) Get

func (*AuthflowControllerHandlers) PostAction

type AuthflowControllerLogger

type AuthflowControllerLogger struct{ *log.Logger }

func NewAuthflowControllerLogger

func NewAuthflowControllerLogger(lf *log.Factory) AuthflowControllerLogger

type AuthflowControllerOAuthClientResolver

type AuthflowControllerOAuthClientResolver interface {
	ResolveClient(clientID string) *config.OAuthClientConfig
}

type AuthflowControllerOAuthSessionService

type AuthflowControllerOAuthSessionService interface {
	Get(entryID string) (*oauthsession.Entry, error)
}

type AuthflowControllerSessionStore

type AuthflowControllerSessionStore interface {
	Get(id string) (*webapp.Session, error)
	Create(session *webapp.Session) (err error)
	Update(session *webapp.Session) (err error)
	Delete(id string) (err error)
}

type AuthflowControllerUIInfoResolver

type AuthflowControllerUIInfoResolver interface {
	ResolveForUI(r protocol.AuthorizationRequest) (*oidc.UIInfo, error)
}

type AuthflowCreatePasswordHandler

type AuthflowCreatePasswordHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowCreatePasswordHandler) GetData

func (*AuthflowCreatePasswordHandler) ServeHTTP

type AuthflowCreatePasswordViewModel

type AuthflowCreatePasswordViewModel struct {
	AuthenticationStage     string
	PasswordManagerUsername string
}

type AuthflowEnterOOBOTPHandler

type AuthflowEnterOOBOTPHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
	FlashMessage  FlashMessage
	Clock         clock.Clock
}

func (*AuthflowEnterOOBOTPHandler) GetData

func (*AuthflowEnterOOBOTPHandler) ServeHTTP

type AuthflowEnterOOBOTPViewModel

type AuthflowEnterOOBOTPViewModel struct {
	FlowActionType                 string
	Channel                        string
	MaskedClaimValue               string
	CodeLength                     int
	FailedAttemptRateLimitExceeded bool
	ResendCooldown                 int
}

type AuthflowEnterPasswordHandler

type AuthflowEnterPasswordHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowEnterPasswordHandler) GetData

func (*AuthflowEnterPasswordHandler) ServeHTTP

type AuthflowEnterPasswordViewModel

type AuthflowEnterPasswordViewModel struct {
	AuthenticationStage     string
	PasswordManagerUsername string
	ForgotPasswordInputType string
	ForgotPasswordLoginID   string
}

type AuthflowEnterRecoveryCodeHandler

type AuthflowEnterRecoveryCodeHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowEnterRecoveryCodeHandler) GetData

func (*AuthflowEnterRecoveryCodeHandler) ServeHTTP

type AuthflowEnterTOTPHandler

type AuthflowEnterTOTPHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowEnterTOTPHandler) GetData

func (*AuthflowEnterTOTPHandler) ServeHTTP

type AuthflowFinishFlowHandler

type AuthflowFinishFlowHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowFinishFlowHandler) ServeHTTP

type AuthflowForgotPasswordHandler

type AuthflowForgotPasswordHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowForgotPasswordHandler) GetData

func (h *AuthflowForgotPasswordHandler) GetData(
	w http.ResponseWriter,
	r *http.Request,
	s *webapp.Session,
	initialScreen *webapp.AuthflowScreenWithFlowResponse,
	selectDestinationScreen *webapp.AuthflowScreenWithFlowResponse) (map[string]interface{}, error)

func (*AuthflowForgotPasswordHandler) ServeHTTP

type AuthflowForgotPasswordOTPAlternativeChannel

type AuthflowForgotPasswordOTPAlternativeChannel struct {
	Index   int
	Channel declarative.AccountRecoveryChannel
}

type AuthflowForgotPasswordOTPHandler

type AuthflowForgotPasswordOTPHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
	FlashMessage  FlashMessage
	Clock         clock.Clock
}

func (*AuthflowForgotPasswordOTPHandler) ServeHTTP

type AuthflowForgotPasswordOTPViewModel

type AuthflowForgotPasswordOTPViewModel struct {
	Channel                        declarative.AccountRecoveryChannel
	MaskedClaimValue               string
	CodeLength                     int
	FailedAttemptRateLimitExceeded bool
	ResendCooldown                 int
	AlternativeChannels            []AuthflowForgotPasswordOTPAlternativeChannel
}

type AuthflowForgotPasswordSuccessHandler

type AuthflowForgotPasswordSuccessHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowForgotPasswordSuccessHandler) GetData

func (*AuthflowForgotPasswordSuccessHandler) ServeHTTP

type AuthflowLoginEndpointsProvider

type AuthflowLoginEndpointsProvider interface {
	SSOCallbackURL(alias string) *url.URL
}

type AuthflowLoginHandler

type AuthflowLoginHandler struct {
	Controller        *AuthflowController
	BaseViewModel     *viewmodels.BaseViewModeler
	AuthflowViewModel *viewmodels.AuthflowViewModeler
	Renderer          Renderer
	MeterService      MeterService
	TutorialCookie    TutorialCookie
	ErrorCookie       ErrorCookie
	Endpoints         AuthflowLoginEndpointsProvider
}

func (*AuthflowLoginHandler) GetData

func (h *AuthflowLoginHandler) GetData(w http.ResponseWriter, r *http.Request, screen *webapp.AuthflowScreenWithFlowResponse, allowLoginOnly bool) (map[string]interface{}, error)

func (*AuthflowLoginHandler) ServeHTTP

func (h *AuthflowLoginHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type AuthflowLoginViewModel

type AuthflowLoginViewModel struct {
	AllowLoginOnly bool
}

func NewAuthflowLoginViewModel

func NewAuthflowLoginViewModel(allowLoginOnly bool) AuthflowLoginViewModel

type AuthflowNavigator

type AuthflowNavigator interface {
	Navigate(screen *webapp.AuthflowScreenWithFlowResponse, r *http.Request, webSessionID string, result *webapp.Result)
	NavigateNonRecoverableError(r *http.Request, u *url.URL, e error)
	NavigateSelectAccount(result *webapp.Result)
	NavigateResetPasswordSuccessPage() string
}

type AuthflowNoAuthenticatorHandler

type AuthflowNoAuthenticatorHandler struct {
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowNoAuthenticatorHandler) ServeHTTP

type AuthflowOAuthCallbackResponse

type AuthflowOAuthCallbackResponse struct {
	State            string
	Code             string
	Error            string
	ErrorDescription string
	ErrorURI         string
}

type AuthflowOOBOTPLinkHandler

type AuthflowOOBOTPLinkHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
	FlashMessage  FlashMessage
	Clock         clock.Clock
}

func (*AuthflowOOBOTPLinkHandler) GetData

func (*AuthflowOOBOTPLinkHandler) ServeHTTP

type AuthflowOOBOTPLinkViewModel

type AuthflowOOBOTPLinkViewModel struct {
	WebsocketURL     htmltemplate.URL
	StateToken       string
	StateQuery       LoginLinkOTPPageQueryState
	MaskedClaimValue string
	ResendCooldown   int
}

type AuthflowPromoteEndpointsProvider

type AuthflowPromoteEndpointsProvider interface {
	SSOCallbackURL(alias string) *url.URL
}

type AuthflowPromoteHandler

type AuthflowPromoteHandler struct {
	Controller        *AuthflowController
	BaseViewModel     *viewmodels.BaseViewModeler
	AuthflowViewModel *viewmodels.AuthflowViewModeler
	Renderer          Renderer
	Endpoints         AuthflowPromoteEndpointsProvider
}

func (*AuthflowPromoteHandler) GetData

func (*AuthflowPromoteHandler) ServeHTTP

type AuthflowPromptCreatePasskeyHandler

type AuthflowPromptCreatePasskeyHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowPromptCreatePasskeyHandler) GetData

func (*AuthflowPromptCreatePasskeyHandler) ServeHTTP

type AuthflowPromptCreatePasskeyViewModel

type AuthflowPromptCreatePasskeyViewModel struct {
	CreationOptionsJSON string
}

type AuthflowReauthHandler

type AuthflowReauthHandler struct {
	Controller *AuthflowController

	AuthflowNavigator AuthflowNavigator
}

func (*AuthflowReauthHandler) ServeHTTP

type AuthflowResetPasswordHandler

type AuthflowResetPasswordHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowResetPasswordHandler) GetData

func (*AuthflowResetPasswordHandler) GetErrorData

func (h *AuthflowResetPasswordHandler) GetErrorData(w http.ResponseWriter, r *http.Request, err error) (map[string]interface{}, error)

func (*AuthflowResetPasswordHandler) ServeHTTP

type AuthflowResetPasswordSuccessHandler

type AuthflowResetPasswordSuccessHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowResetPasswordSuccessHandler) GetData

func (h *AuthflowResetPasswordSuccessHandler) GetData(w http.ResponseWriter, r *http.Request) (map[string]interface{}, error)

func (*AuthflowResetPasswordSuccessHandler) ServeHTTP

type AuthflowResetPasswordSuccessViewModel

type AuthflowResetPasswordSuccessViewModel struct {
	CanBackToSignIn bool
}

type AuthflowSetupOOBOTPHandler

type AuthflowSetupOOBOTPHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowSetupOOBOTPHandler) GetData

func (*AuthflowSetupOOBOTPHandler) ServeHTTP

type AuthflowSetupOOBOTPViewModel

type AuthflowSetupOOBOTPViewModel struct {
	OOBAuthenticatorType model.AuthenticatorType
	Channel              model.AuthenticatorOOBChannel
}

type AuthflowSetupTOTPHandler

type AuthflowSetupTOTPHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowSetupTOTPHandler) GetData

func (*AuthflowSetupTOTPHandler) ServeHTTP

type AuthflowSetupTOTPViewModel

type AuthflowSetupTOTPViewModel struct {
	Secret   string
	ImageURI htmltemplate.URL
}

type AuthflowSignupEndpointsProvider

type AuthflowSignupEndpointsProvider interface {
	SSOCallbackURL(alias string) *url.URL
}

type AuthflowSignupHandler

type AuthflowSignupHandler struct {
	Controller        *AuthflowController
	BaseViewModel     *viewmodels.BaseViewModeler
	AuthflowViewModel *viewmodels.AuthflowViewModeler
	Renderer          Renderer
	MeterService      MeterService
	TutorialCookie    TutorialCookie
	Endpoints         AuthflowSignupEndpointsProvider
}

func (*AuthflowSignupHandler) GetData

func (*AuthflowSignupHandler) ServeHTTP

type AuthflowTerminateOtherSessionsHandler

type AuthflowTerminateOtherSessionsHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowTerminateOtherSessionsHandler) GetData

func (*AuthflowTerminateOtherSessionsHandler) ServeHTTP

type AuthflowUsePasskeyHandler

type AuthflowUsePasskeyHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowUsePasskeyHandler) GetData

func (*AuthflowUsePasskeyHandler) ServeHTTP

type AuthflowUsePasskeyViewModel

type AuthflowUsePasskeyViewModel struct {
	PasskeyRequestOptionsJSON string
}

type AuthflowViewRecoveryCodeHandler

type AuthflowViewRecoveryCodeHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowViewRecoveryCodeHandler) GetData

func (*AuthflowViewRecoveryCodeHandler) ServeHTTP

type AuthflowViewRecoveryCodeViewModel

type AuthflowViewRecoveryCodeViewModel struct {
	RecoveryCodes []string
}

type AuthflowWechatHandler

type AuthflowWechatHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
}

func (*AuthflowWechatHandler) GetData

func (*AuthflowWechatHandler) ServeHTTP

type AuthflowWechatViewModel

type AuthflowWechatViewModel struct {
	ImageURI          htmltemplate.URL
	WechatRedirectURI htmltemplate.URL
}

type AuthflowWhatsappOTPHandler

type AuthflowWhatsappOTPHandler struct {
	Controller    *AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
	FlashMessage  FlashMessage
	Clock         clock.Clock
}

func (*AuthflowWhatsappOTPHandler) GetData

func (*AuthflowWhatsappOTPHandler) ServeHTTP

type AuthflowWhatsappOTPViewModel

type AuthflowWhatsappOTPViewModel struct {
	MaskedClaimValue               string
	CodeLength                     int
	FailedAttemptRateLimitExceeded bool
	ResendCooldown                 int
}

type Authorization

type Authorization struct {
	ID                    string
	ClientID              string
	ClientName            string
	Scope                 []string
	CreatedAt             time.Time
	HasFullUserInfoAccess bool
}

type BiometricIdentity

type BiometricIdentity struct {
	ID          string
	DisplayName string
	CreatedAt   time.Time
}

type ChangePasswordViewModel

type ChangePasswordViewModel struct {
	Force bool
}

type ConfirmTerminateOtherSessionsEndpointsProvider

type ConfirmTerminateOtherSessionsEndpointsProvider interface {
	SelectAccountEndpointURL(uiImpl config.UIImplementation) *url.URL
}

type ConfirmTerminateOtherSessionsHandler

type ConfirmTerminateOtherSessionsHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	Endpoints         ConfirmTerminateOtherSessionsEndpointsProvider
	UIConfig          *config.UIConfig
}

func (*ConfirmTerminateOtherSessionsHandler) GetData

func (h *ConfirmTerminateOtherSessionsHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*ConfirmTerminateOtherSessionsHandler) ServeHTTP

type ConnectWeb3AccountHandler

type ConnectWeb3AccountHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AuthenticationViewModel   *viewmodels.AuthenticationViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
	AuthenticationConfig      *config.AuthenticationConfig
}

func (*ConnectWeb3AccountHandler) GetData

func (h *ConnectWeb3AccountHandler) GetData(r *http.Request, rw http.ResponseWriter, graph *interaction.Graph) (map[string]interface{}, error)

func (*ConnectWeb3AccountHandler) ServeHTTP

type ConnectWeb3AccountViewModel

type ConnectWeb3AccountViewModel struct {
	Provider string
}

type Controller

type Controller struct {
	Log *log.Logger
	ControllerDeps
	// contains filtered or unexported fields
}

func (*Controller) DeleteSession

func (c *Controller) DeleteSession(id string) error

func (*Controller) EntryPointGet

func (c *Controller) EntryPointGet(
	opts webapp.SessionOptions,
	intent interaction.Intent,
) (*interaction.Graph, error)

func (*Controller) EntryPointPost

func (c *Controller) EntryPointPost(
	opts webapp.SessionOptions,
	intent interaction.Intent,
	inputFn func() (interface{}, error),
) (*webapp.Result, error)

func (*Controller) EntryPointSession

func (c *Controller) EntryPointSession(opts webapp.SessionOptions) *webapp.Session

func (*Controller) Get

func (c *Controller) Get(fn func() error)

func (*Controller) GetSession

func (c *Controller) GetSession(id string) (*webapp.Session, error)

func (*Controller) InteractionGet

func (c *Controller) InteractionGet() (*interaction.Graph, error)

func (*Controller) InteractionGetWithSession

func (c *Controller) InteractionGetWithSession(s *webapp.Session) (*interaction.Graph, error)

func (*Controller) InteractionOAuthCallback

func (c *Controller) InteractionOAuthCallback(oauthInput InputOAuthCallback, oauthState string) (*webapp.Result, error)

func (*Controller) InteractionPost

func (c *Controller) InteractionPost(inputFn func() (interface{}, error)) (*webapp.Result, error)

func (*Controller) InteractionSession

func (c *Controller) InteractionSession() (*webapp.Session, error)

func (*Controller) PostAction

func (c *Controller) PostAction(action string, fn func() error)

func (*Controller) RedirectURI

func (c *Controller) RedirectURI() string

func (*Controller) RequireUserID

func (c *Controller) RequireUserID() string

func (*Controller) Serve

func (c *Controller) Serve()

func (*Controller) UpdateSession

func (c *Controller) UpdateSession(s *webapp.Session) error

type ControllerDeps

type ControllerDeps struct {
	Database                *appdb.Handle
	RedisHandle             *appredis.Handle
	AppID                   config.AppID
	Page                    PageService
	BaseViewModel           *viewmodels.BaseViewModeler
	Renderer                Renderer
	Publisher               *Publisher
	Clock                   clock.Clock
	UIConfig                *config.UIConfig
	ErrorCookie             *webapp.ErrorCookie
	TesterEndpointsProvider tester.EndpointsProvider

	TrustProxy config.TrustProxy
}

type ControllerFactory

type ControllerFactory struct {
	LoggerFactory *log.Factory
	ControllerDeps
}

func (*ControllerFactory) New

type CookieManager

type CookieManager interface {
	GetCookie(r *http.Request, def *httputil.CookieDef) (*http.Cookie, error)
	ValueCookie(def *httputil.CookieDef, value string) *http.Cookie
	ClearCookie(def *httputil.CookieDef) *http.Cookie
}

type CreateAuthenticatorBeginNode

type CreateAuthenticatorBeginNode interface {
	GetCreateAuthenticatorEdges() ([]interaction.Edge, error)
	GetCreateAuthenticatorStage() authn.AuthenticationStage
}

type CreateAuthenticatorPhoneOTPNode

type CreateAuthenticatorPhoneOTPNode interface {
	GetCreateAuthenticatorStage() authn.AuthenticationStage
	GetSelectedPhoneNumberForPhoneOTP() string
}

type CreatePasskeyHandler

type CreatePasskeyHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
}

func (*CreatePasskeyHandler) GetData

func (h *CreatePasskeyHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*CreatePasskeyHandler) ServeHTTP

func (h *CreatePasskeyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type CreatePasswordHandler

type CreatePasswordHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
	PasswordPolicy            PasswordPolicy
}

func (*CreatePasswordHandler) GetData

func (h *CreatePasswordHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*CreatePasswordHandler) ServeHTTP

type CreatePasswordViewModel

type CreatePasswordViewModel struct {
	IdentityDisplayID string
}

type EnterLoginIDHandler

type EnterLoginIDHandler struct {
	ControllerFactory       ControllerFactory
	BaseViewModel           *viewmodels.BaseViewModeler
	AuthenticationViewModel *viewmodels.AuthenticationViewModeler
	Renderer                Renderer
	Identities              EnterLoginIDService
}

func (*EnterLoginIDHandler) GetData

func (h *EnterLoginIDHandler) GetData(userID string, r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*EnterLoginIDHandler) ServeHTTP

func (h *EnterLoginIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type EnterLoginIDService

type EnterLoginIDService interface {
	Get(id string) (*identity.Info, error)
	ListCandidates(userID string) ([]identity.Candidate, error)
}

type EnterLoginIDViewModel

type EnterLoginIDViewModel struct {
	LoginIDKey       string
	LoginIDType      string
	LoginIDInputType string
	IdentityID       string
	DisplayID        string
}

func NewEnterLoginIDViewModel

func NewEnterLoginIDViewModel(r *http.Request, displayID string) EnterLoginIDViewModel

type EnterOOBOTPHandler

type EnterOOBOTPHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
	FlashMessage              FlashMessage
	OTPCodeService            OTPCodeService
	Clock                     clock.Clock
	Config                    *config.AppConfig
}

func (*EnterOOBOTPHandler) GetData

func (h *EnterOOBOTPHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*EnterOOBOTPHandler) ServeHTTP

func (h *EnterOOBOTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type EnterOOBOTPNode

type EnterOOBOTPNode interface {
	GetOOBOTPTarget() string
	GetOOBOTPChannel() string
	GetOOBOTPCodeLength() int
	GetOOBOTPOOBType() interaction.OOBType
}

type EnterOOBOTPViewModel

type EnterOOBOTPViewModel struct {
	OOBOTPTarget                   string
	OOBOTPCodeSendCooldown         int
	OOBOTPCodeLength               int
	OOBOTPChannel                  string
	FailedAttemptRateLimitExceeded bool
}

type EnterPasswordHandler

type EnterPasswordHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
}

func (*EnterPasswordHandler) GetData

func (h *EnterPasswordHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*EnterPasswordHandler) ServeHTTP

func (h *EnterPasswordHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type EnterPasswordViewModel

type EnterPasswordViewModel struct {
	IdentityDisplayID string
	// ForgotPasswordInputType is either phone or email
	ForgotPasswordInputType string
	ForgotPasswordLoginID   string
	Variant                 EnterPasswordViewVariant
}

type EnterPasswordViewVariant

type EnterPasswordViewVariant string
const (
	EnterPasswordViewVariantDefault EnterPasswordViewVariant = "default"
	EnterPasswordViewVariantReAuth  EnterPasswordViewVariant = "reauth"
)

type EnterRecoveryCodeHandler

type EnterRecoveryCodeHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
}

func (*EnterRecoveryCodeHandler) GetData

func (h *EnterRecoveryCodeHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*EnterRecoveryCodeHandler) ServeHTTP

type EnterTOTPHandler

type EnterTOTPHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
}

func (*EnterTOTPHandler) GetData

func (h *EnterTOTPHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*EnterTOTPHandler) ServeHTTP

func (h *EnterTOTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ErrorCookie

type ErrorCookie interface {
	GetError(r *http.Request) (*webapp.ErrorState, bool)
}

type ErrorHandler

type ErrorHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
}

func (*ErrorHandler) GetData

func (h *ErrorHandler) GetData(r *http.Request, w http.ResponseWriter) (map[string]interface{}, error)

func (*ErrorHandler) ServeHTTP

func (h *ErrorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type FeatureDisabledHandler

type FeatureDisabledHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
}

func (*FeatureDisabledHandler) GetData

func (h *FeatureDisabledHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*FeatureDisabledHandler) ServeHTTP

type FlashMessage

type FlashMessage interface {
	Flash(rw http.ResponseWriter, messageType string)
}

type ForceChangePasswordHandler

type ForceChangePasswordHandler struct {
	ControllerFactory       ControllerFactory
	BaseViewModel           *viewmodels.BaseViewModeler
	ChangePasswordViewModel *viewmodels.ChangePasswordViewModeler
	Renderer                Renderer
	PasswordPolicy          PasswordPolicy
}

func (*ForceChangePasswordHandler) GetData

func (h *ForceChangePasswordHandler) GetData(r *http.Request, rw http.ResponseWriter, graph *interaction.Graph) (map[string]interface{}, error)

func (*ForceChangePasswordHandler) ServeHTTP

type ForceChangeSecondaryPasswordHandler

type ForceChangeSecondaryPasswordHandler struct {
	ControllerFactory       ControllerFactory
	BaseViewModel           *viewmodels.BaseViewModeler
	ChangePasswordViewModel viewmodels.ChangePasswordViewModeler
	Renderer                Renderer
	PasswordPolicy          PasswordPolicy
}

func (*ForceChangeSecondaryPasswordHandler) GetData

func (h *ForceChangeSecondaryPasswordHandler) GetData(r *http.Request, rw http.ResponseWriter, graph *interaction.Graph) (map[string]interface{}, error)

func (*ForceChangeSecondaryPasswordHandler) ServeHTTP

type ForgotPasswordHandler

type ForgotPasswordHandler struct {
	ControllerFactory       ControllerFactory
	BaseViewModel           *viewmodels.BaseViewModeler
	AuthenticationViewModel *viewmodels.AuthenticationViewModeler
	FormPrefiller           *FormPrefiller
	Renderer                Renderer
}

func (*ForgotPasswordHandler) GetData

func (h *ForgotPasswordHandler) GetData(r *http.Request, rw http.ResponseWriter, graph *interaction.Graph) (map[string]interface{}, error)

func (*ForgotPasswordHandler) ServeHTTP

type ForgotPasswordLoginIDInputType

type ForgotPasswordLoginIDInputType string
const (
	ForgotPasswordLoginIDInputTypeEmail ForgotPasswordLoginIDInputType = "email"
	ForgotPasswordLoginIDInputTypePhone ForgotPasswordLoginIDInputType = "phone"
)

func (ForgotPasswordLoginIDInputType) IsValid

type ForgotPasswordSuccessHandler

type ForgotPasswordSuccessHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
}

func (*ForgotPasswordSuccessHandler) GetData

func (h *ForgotPasswordSuccessHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session) (map[string]interface{}, error)

func (*ForgotPasswordSuccessHandler) ServeHTTP

type ForgotPasswordSuccessNode

type ForgotPasswordSuccessNode interface {
	GetLoginID() string
}

type ForgotPasswordSuccessViewModel

type ForgotPasswordSuccessViewModel struct {
	GivenLoginID string
}

type ForgotPasswordViewModel

type ForgotPasswordViewModel struct {
	LoginIDInputType string
	LoginID          string
}

func NewForgotPasswordViewModel

func NewForgotPasswordViewModel(r *http.Request) ForgotPasswordViewModel

type FormPrefiller

type FormPrefiller struct {
	LoginID *config.LoginIDConfig
	UI      *config.UIConfig
}

func (*FormPrefiller) Prefill

func (p *FormPrefiller) Prefill(form url.Values)

type GeneratedStaticAssetsHandler

type GeneratedStaticAssetsHandler struct {
	EmbeddedResources GlobalEmbeddedResourceManager
}

func (*GeneratedStaticAssetsHandler) ServeHTTP

type GlobalEmbeddedResourceManager

type GlobalEmbeddedResourceManager interface {
	Open(name string) (http.File, error)
}

type GlobalSessionService

type GlobalSessionService struct {
	SessionStore SessionStore
	Publisher    *Publisher
	Clock        clock.Clock
}

func (*GlobalSessionService) GetSession

func (s *GlobalSessionService) GetSession(sessionID string) (session *webapp.Session, err error)

func (*GlobalSessionService) UpdateSession

func (s *GlobalSessionService) UpdateSession(session *webapp.Session) error

type GlobalSessionServiceFactory

type GlobalSessionServiceFactory struct {
	Clock       clock.Clock
	RedisHandle *appredis.Handle
}

func (*GlobalSessionServiceFactory) NewGlobalSessionService

func (f *GlobalSessionServiceFactory) NewGlobalSessionService(appID config.AppID) *GlobalSessionService

type ImplementationSwitcherHandler

type ImplementationSwitcherHandler struct {
	Interaction http.Handler
	Authflow    http.Handler
	AuthflowV2  http.Handler
}

func (*ImplementationSwitcherHandler) ServeHTTP

type ImplementationSwitcherMiddleware

type ImplementationSwitcherMiddleware struct {
	UIConfig *config.UIConfig
}

func (*ImplementationSwitcherMiddleware) Handle

type InputAuthOOB

type InputAuthOOB struct {
	Code        string
	DeviceToken bool
}

func (*InputAuthOOB) CreateDeviceToken

func (i *InputAuthOOB) CreateDeviceToken() bool

func (*InputAuthOOB) GetOOBOTP

func (i *InputAuthOOB) GetOOBOTP() string

type InputAuthPassword

type InputAuthPassword struct {
	Stage       string
	Password    string
	DeviceToken bool
}

func (*InputAuthPassword) CreateDeviceToken

func (i *InputAuthPassword) CreateDeviceToken() bool

func (*InputAuthPassword) GetAuthenticationStage

func (i *InputAuthPassword) GetAuthenticationStage() authn.AuthenticationStage

func (*InputAuthPassword) GetPassword

func (i *InputAuthPassword) GetPassword() string

type InputAuthRecoveryCode

type InputAuthRecoveryCode struct {
	Code        string
	DeviceToken bool
}

func (*InputAuthRecoveryCode) CreateDeviceToken

func (i *InputAuthRecoveryCode) CreateDeviceToken() bool

func (*InputAuthRecoveryCode) GetRecoveryCode

func (i *InputAuthRecoveryCode) GetRecoveryCode() string

type InputAuthTOTP

type InputAuthTOTP struct {
	Code        string
	DeviceToken bool
}

func (*InputAuthTOTP) CreateDeviceToken

func (i *InputAuthTOTP) CreateDeviceToken() bool

func (*InputAuthTOTP) GetTOTP

func (i *InputAuthTOTP) GetTOTP() string

type InputChangePassword

type InputChangePassword struct {
	AuthenticationStage authn.AuthenticationStage
	OldPassword         string
	NewPassword         string
}

func (*InputChangePassword) GetAuthenticationStage

func (i *InputChangePassword) GetAuthenticationStage() authn.AuthenticationStage

func (*InputChangePassword) GetNewPassword

func (i *InputChangePassword) GetNewPassword() string

func (*InputChangePassword) GetOldPassword

func (i *InputChangePassword) GetOldPassword() string

type InputConfirmTerminateOtherSessions

type InputConfirmTerminateOtherSessions struct {
	IsConfirm bool
}

func (*InputConfirmTerminateOtherSessions) GetIsConfirmed

func (i *InputConfirmTerminateOtherSessions) GetIsConfirmed() bool

type InputConfirmWeb3AccountRequest

type InputConfirmWeb3AccountRequest struct {
	Message   string
	Signature string
}

func (*InputConfirmWeb3AccountRequest) GetMessage

func (i *InputConfirmWeb3AccountRequest) GetMessage() string

func (*InputConfirmWeb3AccountRequest) GetSignature

func (i *InputConfirmWeb3AccountRequest) GetSignature() string

type InputCreateAuthenticator

type InputCreateAuthenticator struct{}

func (*InputCreateAuthenticator) RequestedByUser

func (i *InputCreateAuthenticator) RequestedByUser() bool

type InputNewLoginID

type InputNewLoginID struct {
	LoginIDType  string
	LoginIDKey   string
	LoginIDValue string
}

func (*InputNewLoginID) GetLoginID

func (i *InputNewLoginID) GetLoginID() string

func (*InputNewLoginID) GetLoginIDKey

func (i *InputNewLoginID) GetLoginIDKey() string

type InputOAuthCallback

type InputOAuthCallback struct {
	ProviderAlias string

	Code             string
	Error            string
	ErrorDescription string
	ErrorURI         string
}

func (*InputOAuthCallback) GetCode

func (i *InputOAuthCallback) GetCode() string

func (*InputOAuthCallback) GetError

func (i *InputOAuthCallback) GetError() string

func (*InputOAuthCallback) GetErrorDescription

func (i *InputOAuthCallback) GetErrorDescription() string

func (*InputOAuthCallback) GetErrorURI

func (i *InputOAuthCallback) GetErrorURI() string

func (*InputOAuthCallback) GetProviderAlias

func (i *InputOAuthCallback) GetProviderAlias() string

type InputPasskeyAssertionResponse

type InputPasskeyAssertionResponse struct {
	Stage             string
	AssertionResponse []byte
}

func (*InputPasskeyAssertionResponse) GetAssertionResponse

func (i *InputPasskeyAssertionResponse) GetAssertionResponse() []byte

func (*InputPasskeyAssertionResponse) GetAuthenticationStage

func (i *InputPasskeyAssertionResponse) GetAuthenticationStage() authn.AuthenticationStage

type InputPasskeyAttestationResponse

type InputPasskeyAttestationResponse struct {
	Stage               string
	AttestationResponse []byte
}

func (*InputPasskeyAttestationResponse) GetAttestationResponse

func (i *InputPasskeyAttestationResponse) GetAttestationResponse() []byte

func (*InputPasskeyAttestationResponse) GetAuthenticationStage

func (i *InputPasskeyAttestationResponse) GetAuthenticationStage() authn.AuthenticationStage

type InputPromptCreatePasskeyAttestationResponse

type InputPromptCreatePasskeyAttestationResponse struct {
	Skipped             bool
	AttestationResponse []byte
}

func (*InputPromptCreatePasskeyAttestationResponse) GetAttestationResponse

func (i *InputPromptCreatePasskeyAttestationResponse) GetAttestationResponse() []byte

func (*InputPromptCreatePasskeyAttestationResponse) IsSkipped

type InputRemoveAuthenticator

type InputRemoveAuthenticator struct {
	Type model.AuthenticatorType
	ID   string
}

func (*InputRemoveAuthenticator) GetAuthenticatorID

func (i *InputRemoveAuthenticator) GetAuthenticatorID() string

func (*InputRemoveAuthenticator) GetAuthenticatorType

func (i *InputRemoveAuthenticator) GetAuthenticatorType() model.AuthenticatorType

type InputRemoveIdentity

type InputRemoveIdentity struct {
	Type model.IdentityType
	ID   string
}

func (*InputRemoveIdentity) GetIdentityID

func (i *InputRemoveIdentity) GetIdentityID() string

func (*InputRemoveIdentity) GetIdentityType

func (i *InputRemoveIdentity) GetIdentityType() model.IdentityType

type InputResendCode

type InputResendCode struct{}

func (*InputResendCode) DoResend

func (i *InputResendCode) DoResend()

type InputResetPassword

type InputResetPassword struct {
	Code     string
	Password string
}

func (*InputResetPassword) GetCode

func (i *InputResetPassword) GetCode() string

func (*InputResetPassword) GetNewPassword

func (i *InputResetPassword) GetNewPassword() string
type InputSelectLoginLink struct{}

func (*InputSelectLoginLink) SetupPrimaryAuthenticatorLoginLinkOTP

func (i *InputSelectLoginLink) SetupPrimaryAuthenticatorLoginLinkOTP()

type InputSelectOOB

type InputSelectOOB struct{}

func (*InputSelectOOB) SetupPrimaryAuthenticatorOOB

func (i *InputSelectOOB) SetupPrimaryAuthenticatorOOB()

type InputSelectTOTP

type InputSelectTOTP struct{}

func (*InputSelectTOTP) SetupTOTP

func (i *InputSelectTOTP) SetupTOTP()

type InputSelectVerifyIdentityViaOOBOTP

type InputSelectVerifyIdentityViaOOBOTP struct{}

func (*InputSelectVerifyIdentityViaOOBOTP) SelectVerifyIdentityViaOOBOTP

func (i *InputSelectVerifyIdentityViaOOBOTP) SelectVerifyIdentityViaOOBOTP()

type InputSelectVerifyIdentityViaWhatsapp

type InputSelectVerifyIdentityViaWhatsapp struct{}

func (*InputSelectVerifyIdentityViaWhatsapp) SelectVerifyIdentityViaWhatsapp

func (i *InputSelectVerifyIdentityViaWhatsapp) SelectVerifyIdentityViaWhatsapp()

type InputSelectWhatsappOTP

type InputSelectWhatsappOTP struct{}

func (*InputSelectWhatsappOTP) SetupPrimaryAuthenticatorWhatsappOTP

func (i *InputSelectWhatsappOTP) SetupPrimaryAuthenticatorWhatsappOTP()

type InputSetupLoginLinkOTP

type InputSetupLoginLinkOTP struct {
	InputType string
	Target    string
}

func (*InputSetupLoginLinkOTP) GetLoginLinkOTPTarget

func (i *InputSetupLoginLinkOTP) GetLoginLinkOTPTarget() string

type InputSetupOOB

type InputSetupOOB struct {
	InputType string
	Target    string
}

func (*InputSetupOOB) GetOOBChannel

func (i *InputSetupOOB) GetOOBChannel() model.AuthenticatorOOBChannel

func (*InputSetupOOB) GetOOBTarget

func (i *InputSetupOOB) GetOOBTarget() string

type InputSetupPassword

type InputSetupPassword struct {
	Stage    string
	Password string
}

func (*InputSetupPassword) GetAuthenticationStage

func (i *InputSetupPassword) GetAuthenticationStage() authn.AuthenticationStage

func (*InputSetupPassword) GetPassword

func (i *InputSetupPassword) GetPassword() string

type InputSetupRecoveryCode

type InputSetupRecoveryCode struct{}

func (*InputSetupRecoveryCode) ViewedRecoveryCodes

func (i *InputSetupRecoveryCode) ViewedRecoveryCodes()

type InputSetupTOTP

type InputSetupTOTP struct {
	Code        string
	DisplayName string
}

func (*InputSetupTOTP) GetTOTP

func (i *InputSetupTOTP) GetTOTP() string

func (*InputSetupTOTP) GetTOTPDisplayName

func (i *InputSetupTOTP) GetTOTPDisplayName() string

type InputSetupWhatsappOTP

type InputSetupWhatsappOTP struct {
	Phone string
}

func (*InputSetupWhatsappOTP) GetWhatsappPhone

func (i *InputSetupWhatsappOTP) GetWhatsappPhone() string
type InputTriggerLoginLink struct {
	AuthenticatorIndex int
}

func (*InputTriggerLoginLink) GetLoginLinkAuthenticatorIndex

func (i *InputTriggerLoginLink) GetLoginLinkAuthenticatorIndex() int

type InputTriggerOOB

type InputTriggerOOB struct {
	AuthenticatorType  string
	AuthenticatorIndex int
}

func (*InputTriggerOOB) GetOOBAuthenticatorIndex

func (i *InputTriggerOOB) GetOOBAuthenticatorIndex() int

func (*InputTriggerOOB) GetOOBAuthenticatorType

func (i *InputTriggerOOB) GetOOBAuthenticatorType() string

type InputTriggerWhatsApp

type InputTriggerWhatsApp struct {
	AuthenticatorIndex int
}

func (*InputTriggerWhatsApp) GetWhatsappAuthenticatorIndex

func (i *InputTriggerWhatsApp) GetWhatsappAuthenticatorIndex() int

type InputUseLoginID

type InputUseLoginID struct {
	LoginIDKey string
	LoginID    string
}

func (*InputUseLoginID) GetLoginID

func (i *InputUseLoginID) GetLoginID() string

func (*InputUseLoginID) GetLoginIDKey

func (i *InputUseLoginID) GetLoginIDKey() string

type InputUseOAuth

type InputUseOAuth struct {
	ProviderAlias    string
	ErrorRedirectURI string
	Prompt           []string
}

func (*InputUseOAuth) GetErrorRedirectURI

func (i *InputUseOAuth) GetErrorRedirectURI() string

func (*InputUseOAuth) GetPrompt

func (i *InputUseOAuth) GetPrompt() []string

func (*InputUseOAuth) GetProviderAlias

func (i *InputUseOAuth) GetProviderAlias() string

type InputVerificationCode

type InputVerificationCode struct {
	Code string
}

func (*InputVerificationCode) GetVerificationCode

func (i *InputVerificationCode) GetVerificationCode() string

type InputVerifyLoginLinkOTP

type InputVerifyLoginLinkOTP struct {
	DeviceToken bool
}

func (*InputVerifyLoginLinkOTP) CreateDeviceToken

func (i *InputVerifyLoginLinkOTP) CreateDeviceToken() bool
func (i *InputVerifyLoginLinkOTP) VerifyLoginLink()

type InputVerifyWhatsappOTP

type InputVerifyWhatsappOTP struct {
	DeviceToken bool
	WhatsappOTP string
}

func (*InputVerifyWhatsappOTP) CreateDeviceToken

func (i *InputVerifyWhatsappOTP) CreateDeviceToken() bool

func (*InputVerifyWhatsappOTP) GetWhatsappOTP

func (i *InputVerifyWhatsappOTP) GetWhatsappOTP() string

type JSONResponseWriter

type JSONResponseWriter interface {
	WriteResponse(rw http.ResponseWriter, resp *api.Response)
}

type LoginHandler

type LoginHandler struct {
	ControllerFactory       ControllerFactory
	BaseViewModel           *viewmodels.BaseViewModeler
	AuthenticationViewModel *viewmodels.AuthenticationViewModeler
	FormPrefiller           *FormPrefiller
	Renderer                Renderer
	MeterService            MeterService
	TutorialCookie          TutorialCookie
	ErrorCookie             ErrorCookie
}

func (*LoginHandler) GetData

func (h *LoginHandler) GetData(r *http.Request, rw http.ResponseWriter, graph *interaction.Graph, allowLoginOnly bool) (map[string]interface{}, error)

func (*LoginHandler) ServeHTTP

func (h *LoginHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type LoginLinkOTPHandler

type LoginLinkOTPHandler struct {
	Clock                     clock.Clock
	LoginLinkOTPCodeService   OTPCodeService
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
	FlashMessage              FlashMessage
	Config                    *config.AppConfig
}

func (*LoginLinkOTPHandler) GetData

func (h *LoginLinkOTPHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*LoginLinkOTPHandler) ServeHTTP

func (h *LoginLinkOTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type LoginLinkOTPNode

type LoginLinkOTPNode interface {
	GetLoginLinkOTPTarget() string
	GetLoginLinkOTPChannel() string
	GetLoginLinkOTPOOBType() interaction.OOBType
}

type LoginLinkOTPPageQueryState

type LoginLinkOTPPageQueryState string
const (
	LoginLinkOTPPageQueryStateInitial     LoginLinkOTPPageQueryState = ""
	LoginLinkOTPPageQueryStateInvalidCode LoginLinkOTPPageQueryState = "invalid_code"
	LoginLinkOTPPageQueryStateMatched     LoginLinkOTPPageQueryState = "matched"
)

func GetLoginLinkStateFromQuery

func GetLoginLinkStateFromQuery(r *http.Request) LoginLinkOTPPageQueryState

func (*LoginLinkOTPPageQueryState) IsValid

func (s *LoginLinkOTPPageQueryState) IsValid() bool

type LoginLinkOTPViewModel

type LoginLinkOTPViewModel struct {
	Target              string
	OTPCodeSendCooldown int
	StateQuery          LoginLinkOTPPageQueryState
}

type LoginViewModel

type LoginViewModel struct {
	AllowLoginOnly   bool
	LoginIDInputType string
}

func NewLoginViewModel

func NewLoginViewModel(allowLoginOnly bool, r *http.Request) LoginViewModel

type LogoutHandler

type LogoutHandler struct {
	ControllerFactory   ControllerFactory
	Database            *appdb.Handle
	TrustProxy          config.TrustProxy
	OAuth               *config.OAuthConfig
	UIConfig            *config.UIConfig
	SessionManager      LogoutSessionManager
	BaseViewModel       *viewmodels.BaseViewModeler
	Renderer            Renderer
	OAuthClientResolver WebappOAuthClientResolver
}

func (*LogoutHandler) ServeHTTP

func (h *LogoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type LogoutSessionManager

type LogoutSessionManager interface {
	Logout(session.Session, http.ResponseWriter) error
}

type MeterService

type MeterService interface {
	TrackPageView(VisitorID string, pageType meter.PageType) error
}

type MissingWeb3WalletHandler

type MissingWeb3WalletHandler struct {
	ControllerFactory    ControllerFactory
	BaseViewModel        *viewmodels.BaseViewModeler
	Renderer             Renderer
	AuthenticationConfig *config.AuthenticationConfig
}

func (*MissingWeb3WalletHandler) GetData

func (h *MissingWeb3WalletHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*MissingWeb3WalletHandler) ServeHTTP

type MissingWeb3WalletViewModel

type MissingWeb3WalletViewModel struct {
	Provider string
}

type NotFoundHandler

type NotFoundHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
}

func (*NotFoundHandler) GetData

func (h *NotFoundHandler) GetData(r *http.Request, w http.ResponseWriter) (map[string]interface{}, error)

func (*NotFoundHandler) ServeHTTP

func (h *NotFoundHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type OAuthEntrypointEndpointsProvider

type OAuthEntrypointEndpointsProvider interface {
	SelectAccountEndpointURL(uiImpl config.UIImplementation) *url.URL
}

type OAuthEntrypointHandler

type OAuthEntrypointHandler struct {
	UIConfig  *config.UIConfig
	Endpoints OAuthEntrypointEndpointsProvider
}

func (*OAuthEntrypointHandler) ServeHTTP

type OTPCodeService

type OTPCodeService interface {
	VerifyOTP(kind otp.Kind, target string, otp string, opts *otp.VerifyOptions) error
	InspectState(kind otp.Kind, target string) (*otp.State, error)

	LookupCode(purpose otp.Purpose, code string) (target string, err error)
	SetSubmittedCode(kind otp.Kind, target string, code string) (*otp.State, error)
}

type PageService

type PageService interface {
	UpdateSession(session *webapp.Session) error
	DeleteSession(id string) error
	PeekUncommittedChanges(session *webapp.Session, fn func(graph *interaction.Graph) error) error
	Get(session *webapp.Session) (*interaction.Graph, error)
	GetSession(id string) (*webapp.Session, error)
	GetWithIntent(session *webapp.Session, intent interaction.Intent) (*interaction.Graph, error)
	PostWithIntent(
		session *webapp.Session,
		intent interaction.Intent,
		inputFn func() (interface{}, error),
	) (result *webapp.Result, err error)
	PostWithInput(
		session *webapp.Session,
		inputFn func() (interface{}, error),
	) (result *webapp.Result, err error)
}

type PanicMiddleware

type PanicMiddleware struct {
	ErrorCookie   *webapp.ErrorCookie
	Logger        PanicMiddlewareLogger
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      Renderer
	UIConfig      *config.UIConfig
	Endpoints     PanicMiddlewareEndpointsProvider
}

func (*PanicMiddleware) Handle

func (m *PanicMiddleware) Handle(next http.Handler) http.Handler

type PanicMiddlewareEndpointsProvider

type PanicMiddlewareEndpointsProvider interface {
	ErrorEndpointURL(uiImpl config.UIImplementation) *url.URL
}

type PanicMiddlewareLogger

type PanicMiddlewareLogger struct{ *log.Logger }

func NewPanicMiddlewareLogger

func NewPanicMiddlewareLogger(lf *log.Factory) PanicMiddlewareLogger

type PasskeyCreationOptionsHandler

type PasskeyCreationOptionsHandler struct {
	Page     PageService
	Database *appdb.Handle
	JSON     JSONResponseWriter
	Passkey  PasskeyCreationOptionsService
}

func (*PasskeyCreationOptionsHandler) ServeHTTP

type PasskeyCreationOptionsService

type PasskeyCreationOptionsService interface {
	MakeCreationOptions(userID string) (*model.WebAuthnCreationOptions, error)
}

type PasskeyRequestOptionsHandler

type PasskeyRequestOptionsHandler struct {
	Page     PageService
	Database *appdb.Handle
	JSON     JSONResponseWriter
	Passkey  PasskeyRequestOptionsService
}

func (*PasskeyRequestOptionsHandler) ServeHTTP

type PasskeyRequestOptionsService

type PasskeyRequestOptionsService interface {
	MakeConditionalRequestOptions() (*model.WebAuthnRequestOptions, error)
	MakeModalRequestOptions() (*model.WebAuthnRequestOptions, error)
	MakeModalRequestOptionsWithUser(userID string) (*model.WebAuthnRequestOptions, error)
}

type PasswordPolicy

type PasswordPolicy interface {
	PasswordPolicy() []password.Policy
	PasswordRules() string
}

type PromoteHandler

type PromoteHandler struct {
	ControllerFactory             ControllerFactory
	BaseViewModel                 *viewmodels.BaseViewModeler
	AuthenticationViewModel       *viewmodels.AuthenticationViewModeler
	FormPrefiller                 *FormPrefiller
	Renderer                      Renderer
	AnonymousUserPromotionService AnonymousUserPromotionService
}

func (*PromoteHandler) GetData

func (h *PromoteHandler) GetData(r *http.Request, rw http.ResponseWriter, graph *interaction.Graph) (map[string]interface{}, error)

func (*PromoteHandler) ServeHTTP

func (h *PromoteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type PromoteInputLoginID

type PromoteInputLoginID struct {
	*webapp.AnonymousTokenInput
	*InputNewLoginID
}

type PromoteInputOAuth

type PromoteInputOAuth struct {
	*webapp.AnonymousTokenInput
	*InputUseOAuth
}

type PromoteViewModel

type PromoteViewModel struct {
	LoginIDKey string
}

func NewPromoteViewModel

func NewPromoteViewModel(r *http.Request) PromoteViewModel

type PromptCreatePasskeyHandler

type PromptCreatePasskeyHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
}

func (*PromptCreatePasskeyHandler) GetData

func (h *PromptCreatePasskeyHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*PromptCreatePasskeyHandler) ServeHTTP

type Publisher

type Publisher struct {
	AppID       config.AppID
	RedisHandle *appredis.Handle
	Publisher   *pubsub.Publisher
}

func NewPublisher

func NewPublisher(appID config.AppID, handle *appredis.Handle) *Publisher

func (*Publisher) Get

func (p *Publisher) Get() *goredis.Client

func (*Publisher) Publish

func (p *Publisher) Publish(s *webapp.Session, msg *WebsocketMessage) error

type ReauthHandler

type ReauthHandler struct {
	ControllerFactory ControllerFactory
}

func (*ReauthHandler) ServeHTTP

func (h *ReauthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Renderer

type Renderer interface {
	// Render renders the template into response body.
	Render(w http.ResponseWriter, r *http.Request, tpl template.Resource, data interface{})
	// RenderHTML is a shorthand of Render that renders HTML.
	RenderHTML(w http.ResponseWriter, r *http.Request, tpl *template.HTML, data interface{})
	RenderStatus(w http.ResponseWriter, req *http.Request, status int, tpl template.Resource, data interface{})
}

type ResetPasswordHandler

type ResetPasswordHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	PasswordPolicy    PasswordPolicy
	ResetPassword     ResetPasswordService
}

func (*ResetPasswordHandler) GetData

func (h *ResetPasswordHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*ResetPasswordHandler) ServeHTTP

func (h *ResetPasswordHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ResetPasswordService

type ResetPasswordService interface {
	VerifyCode(code string) (state *otp.State, err error)
}

type ResetPasswordSuccessHandler

type ResetPasswordSuccessHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
}

func (*ResetPasswordSuccessHandler) GetData

func (h *ResetPasswordSuccessHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*ResetPasswordSuccessHandler) ServeHTTP

type ResourceManager

type ResourceManager interface {
	Read(desc resource.Descriptor, view resource.View) (interface{}, error)
	Resolve(path string) (resource.Descriptor, bool)
}

type ResponseRenderer

type ResponseRenderer struct {
	TemplateEngine *template.Engine
}

func (*ResponseRenderer) Render

func (r *ResponseRenderer) Render(w http.ResponseWriter, req *http.Request, tpl template.Resource, data interface{})

func (*ResponseRenderer) RenderHTML

func (r *ResponseRenderer) RenderHTML(w http.ResponseWriter, req *http.Request, tpl *template.HTML, data interface{})

func (*ResponseRenderer) RenderStatus

func (r *ResponseRenderer) RenderStatus(w http.ResponseWriter, req *http.Request, status int, tpl template.Resource, data interface{})

type ResponseWriter

type ResponseWriter struct {
	JSONResponseWriter JSONResponseWriter
	Renderer           Renderer
}

func (*ResponseWriter) PrepareData

func (w *ResponseWriter) PrepareData(err error) map[string]interface{}

func (*ResponseWriter) WriteResponse

func (w *ResponseWriter) WriteResponse(rw http.ResponseWriter, req *http.Request, resp *api.Response)

type ReturnHandler

type ReturnHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
}

func (*ReturnHandler) GetData

func (h *ReturnHandler) GetData(r *http.Request, w http.ResponseWriter) (map[string]interface{}, error)

func (*ReturnHandler) ServeHTTP

func (h *ReturnHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RootHandler

type RootHandler struct {
	AuthenticationConfig *config.AuthenticationConfig
	Cookies              CookieManager
	SignedUpCookie       webapp.SignedUpCookieDef
}

func (*RootHandler) ServeHTTP

func (h *RootHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SSOCallbackHandler

type SSOCallbackHandler struct {
	AuthflowController *AuthflowController
	ControllerFactory  ControllerFactory
	UIConfig           *config.UIConfig
}

func (*SSOCallbackHandler) ServeHTTP

func (h *SSOCallbackHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SelectAccountAuthenticationInfoService

type SelectAccountAuthenticationInfoService interface {
	Save(entry *authenticationinfo.Entry) error
}

type SelectAccountHandler

type SelectAccountHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	Renderer                  Renderer
	AuthenticationConfig      *config.AuthenticationConfig
	SignedUpCookie            webapp.SignedUpCookieDef
	Users                     SelectAccountUserService
	Identities                SelectAccountIdentityService
	AuthenticationInfoService SelectAccountAuthenticationInfoService
	UIInfoResolver            SelectAccountUIInfoResolver
	Cookies                   CookieManager
	OAuthConfig               *config.OAuthConfig
	UIConfig                  *config.UIConfig
	OAuthClientResolver       WebappOAuthClientResolver
}

func (*SelectAccountHandler) GetData

func (h *SelectAccountHandler) GetData(r *http.Request, rw http.ResponseWriter, userID string) (map[string]interface{}, error)

func (*SelectAccountHandler) ServeHTTP

func (h *SelectAccountHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

nolint: gocognit

type SelectAccountIdentityService

type SelectAccountIdentityService interface {
	ListByUser(userID string) ([]*identity.Info, error)
}

type SelectAccountUIInfoResolver

type SelectAccountUIInfoResolver interface {
	SetAuthenticationInfoInQuery(redirectURI string, e *authenticationinfo.Entry) string
}

type SelectAccountUserService

type SelectAccountUserService interface {
	Get(userID string, role accesscontrol.Role) (*model.User, error)
}

type SelectAccountViewModel

type SelectAccountViewModel struct {
	IdentityDisplayName string
	UserProfile         UserProfile
}

type SessionStore

type SessionStore interface {
	Get(id string) (session *webapp.Session, err error)
	Update(session *webapp.Session) (err error)
}

type SettingsAuthenticatorService

type SettingsAuthenticatorService interface {
	List(userID string, filters ...authenticator.Filter) ([]*authenticator.Info, error)
}

type SettingsAuthorizationService

type SettingsAuthorizationService interface {
	GetByID(id string) (*oauth.Authorization, error)
	ListByUser(userID string, filters ...oauth.AuthorizationFilter) ([]*oauth.Authorization, error)
	Delete(a *oauth.Authorization) error
}

type SettingsBiometricHandler

type SettingsBiometricHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	Identities        SettingsIdentityService
}

func (*SettingsBiometricHandler) GetData

func (h *SettingsBiometricHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsBiometricHandler) ServeHTTP

type SettingsBiometricViewModel

type SettingsBiometricViewModel struct {
	BiometricIdentities []*BiometricIdentity
}

type SettingsChangePasswordHandler

type SettingsChangePasswordHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	PasswordPolicy    PasswordPolicy
}

func (*SettingsChangePasswordHandler) GetData

func (h *SettingsChangePasswordHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsChangePasswordHandler) ServeHTTP

type SettingsChangeSecondaryPasswordHandler

type SettingsChangeSecondaryPasswordHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	PasswordPolicy    PasswordPolicy
}

func (*SettingsChangeSecondaryPasswordHandler) GetData

func (h *SettingsChangeSecondaryPasswordHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsChangeSecondaryPasswordHandler) ServeHTTP

type SettingsDeleteAccountHandler

type SettingsDeleteAccountHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	AccountDeletion   *config.AccountDeletionConfig
	Clock             clock.Clock
	Users             SettingsDeleteAccountUserService
	Cookies           CookieManager
}

func (*SettingsDeleteAccountHandler) GetData

func (h *SettingsDeleteAccountHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsDeleteAccountHandler) ServeHTTP

type SettingsDeleteAccountSuccessHandler

type SettingsDeleteAccountSuccessHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	AccountDeletion   *config.AccountDeletionConfig
	Clock             clock.Clock
}

func (*SettingsDeleteAccountSuccessHandler) GetData

func (h *SettingsDeleteAccountSuccessHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsDeleteAccountSuccessHandler) ServeHTTP

type SettingsDeleteAccountUserService

type SettingsDeleteAccountUserService interface {
	ScheduleDeletionByEndUser(userID string) error
}

type SettingsDeleteAccountViewModel

type SettingsDeleteAccountViewModel struct {
	ExpectedAccountDeletionTime time.Time
}

type SettingsHandler

type SettingsHandler struct {
	ControllerFactory        ControllerFactory
	BaseViewModel            *viewmodels.BaseViewModeler
	AuthenticationViewModel  *viewmodels.AuthenticationViewModeler
	SettingsViewModel        *viewmodels.SettingsViewModeler
	SettingsProfileViewModel *viewmodels.SettingsProfileViewModeler
	Renderer                 Renderer
	Identities               SettingsIdentityService
	Verification             SettingsVerificationService
	AccountDeletion          *config.AccountDeletionConfig
	AccountAnonymization     *config.AccountAnonymizationConfig
	TutorialCookie           TutorialCookie
}

func (*SettingsHandler) GetData

func (h *SettingsHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsHandler) ServeHTTP

func (h *SettingsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SettingsIdentityHandler

type SettingsIdentityHandler struct {
	ControllerFactory       ControllerFactory
	BaseViewModel           *viewmodels.BaseViewModeler
	AuthenticationViewModel *viewmodels.AuthenticationViewModeler
	Renderer                Renderer
	Identities              SettingsIdentityService
	Verification            SettingsVerificationService
	AccountDeletion         *config.AccountDeletionConfig
}

func (*SettingsIdentityHandler) GetData

func (h *SettingsIdentityHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsIdentityHandler) ServeHTTP

type SettingsIdentityService

type SettingsIdentityService interface {
	ListByUser(userID string) ([]*identity.Info, error)
	ListCandidates(userID string) ([]identity.Candidate, error)
}

type SettingsIdentityViewModel

type SettingsIdentityViewModel struct {
	VerificationStatuses   map[string][]verification.ClaimStatus
	AccountDeletionAllowed bool
}

type SettingsMFAHandler

type SettingsMFAHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	SettingsViewModel *viewmodels.SettingsViewModeler
	Renderer          Renderer
	MFA               SettingsMFAService
}

func (*SettingsMFAHandler) ServeHTTP

func (h *SettingsMFAHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SettingsMFAService

type SettingsMFAService interface {
	ListRecoveryCodes(userID string) ([]*mfa.RecoveryCode, error)
	InvalidateAllDeviceTokens(userID string) error
}

type SettingsOOBOTPHandler

type SettingsOOBOTPHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	Authenticators    SettingsAuthenticatorService
}

func (*SettingsOOBOTPHandler) GetData

func (h *SettingsOOBOTPHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsOOBOTPHandler) ServeHTTP

type SettingsOOBOTPViewModel

type SettingsOOBOTPViewModel struct {
	OOBAuthenticatorType model.AuthenticatorType
	Authenticators       []*authenticator.Info
}

type SettingsPasskeyHandler

type SettingsPasskeyHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	Identities        SettingsIdentityService
}

func (*SettingsPasskeyHandler) GetData

func (h *SettingsPasskeyHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsPasskeyHandler) ServeHTTP

type SettingsPasskeyViewModel

type SettingsPasskeyViewModel struct {
	PasskeyIdentities []*identity.Info
}

type SettingsProfileEditCustomAttrsService

type SettingsProfileEditCustomAttrsService interface {
	UpdateCustomAttributesWithForm(role accesscontrol.Role, userID string, jsonPointerMap map[string]string) error
}

type SettingsProfileEditHandler

type SettingsProfileEditHandler struct {
	ControllerFactory        ControllerFactory
	BaseViewModel            *viewmodels.BaseViewModeler
	SettingsProfileViewModel *viewmodels.SettingsProfileViewModeler
	Renderer                 Renderer
	Users                    SettingsProfileEditUserService
	StdAttrs                 SettingsProfileEditStdAttrsService
	CustomAttrs              SettingsProfileEditCustomAttrsService
	ErrorCookie              *webapp.ErrorCookie
}

func (*SettingsProfileEditHandler) GetData

func (h *SettingsProfileEditHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsProfileEditHandler) ServeHTTP

type SettingsProfileEditStdAttrsService

type SettingsProfileEditStdAttrsService interface {
	UpdateStandardAttributes(role accesscontrol.Role, userID string, stdAttrs map[string]interface{}) error
}

type SettingsProfileEditUserService

type SettingsProfileEditUserService interface {
	GetRaw(id string) (*user.User, error)
}

type SettingsProfileHandler

type SettingsProfileHandler struct {
	ControllerFactory        ControllerFactory
	BaseViewModel            *viewmodels.BaseViewModeler
	SettingsProfileViewModel *viewmodels.SettingsProfileViewModeler
	Renderer                 Renderer
}

func (*SettingsProfileHandler) ServeHTTP

type SettingsRecoveryCodeHandler

type SettingsRecoveryCodeHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	Authentication    *config.AuthenticationConfig
	MFA               SettingsMFAService
}

func (*SettingsRecoveryCodeHandler) GetData

func (h *SettingsRecoveryCodeHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsRecoveryCodeHandler) ServeHTTP

type SettingsRecoveryCodeViewModel

type SettingsRecoveryCodeViewModel struct {
	RecoveryCodes []string
}

type SettingsSessionListingService

type SettingsSessionListingService interface {
	FilterForDisplay(sessions []session.Session, currentSession session.Session) ([]*sessionlisting.Session, error)
}

type SettingsSessionManager

type SettingsSessionManager interface {
	List(userID string) ([]session.Session, error)
	Get(id string) (session.Session, error)
	RevokeWithEvent(s session.Session, isTermination bool, isAdminAPI bool) error
	TerminateAllExcept(userID string, currentSession session.Session, isAdminAPI bool) error
}

type SettingsSessionsHandler

type SettingsSessionsHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	Sessions          SettingsSessionManager
	Authorizations    SettingsAuthorizationService
	OAuthConfig       *config.OAuthConfig
	SessionListing    SettingsSessionListingService
}

func (*SettingsSessionsHandler) GetData

func (h *SettingsSessionsHandler) GetData(r *http.Request, rw http.ResponseWriter, s session.Session) (map[string]interface{}, error)

func (*SettingsSessionsHandler) ServeHTTP

type SettingsSessionsViewModel

type SettingsSessionsViewModel struct {
	CurrentSessionID string
	Sessions         []*sessionlisting.Session
	Authorizations   []Authorization
}

type SettingsTOTPHandler

type SettingsTOTPHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	Authenticators    SettingsAuthenticatorService
}

func (*SettingsTOTPHandler) GetData

func (h *SettingsTOTPHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsTOTPHandler) ServeHTTP

func (h *SettingsTOTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SettingsTOTPViewModel

type SettingsTOTPViewModel struct {
	Authenticators []*authenticator.Info
}

type SettingsVerificationService

type SettingsVerificationService interface {
	GetVerificationStatuses(is []*identity.Info) (map[string][]verification.ClaimStatus, error)
}

type SetupLoginLinkOTPHandler

type SetupLoginLinkOTPHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
}

func (*SetupLoginLinkOTPHandler) GetData

func (h *SetupLoginLinkOTPHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*SetupLoginLinkOTPHandler) ServeHTTP

type SetupLoginLinkOTPNode

type SetupLoginLinkOTPNode interface {
}

type SetupOOBOTPHandler

type SetupOOBOTPHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
}

func (*SetupOOBOTPHandler) GetData

func (h *SetupOOBOTPHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph, oobAuthenticatorType model.AuthenticatorType) (map[string]interface{}, error)

func (*SetupOOBOTPHandler) ServeHTTP

func (h *SetupOOBOTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SetupOOBOTPNode

type SetupOOBOTPNode interface {
	IsOOBAuthenticatorTypeAllowed(oobAuthenticatorType model.AuthenticatorType) (bool, error)
}

type SetupOOBOTPViewModel

type SetupOOBOTPViewModel struct {
	// OOBAuthenticatorType is either AuthenticatorTypeOOBSMS or AuthenticatorTypeOOBEmail.
	OOBAuthenticatorType model.AuthenticatorType
	AlternativeSteps     []viewmodels.AlternativeStep
}

func NewSetupOOBOTPViewModel

func NewSetupOOBOTPViewModel(session *webapp.Session, graph *interaction.Graph, oobAuthenticatorType model.AuthenticatorType, alternatives *viewmodels.AlternativeStepsViewModel) (*SetupOOBOTPViewModel, error)

type SetupRecoveryCodeHandler

type SetupRecoveryCodeHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
}

func (*SetupRecoveryCodeHandler) GetData

func (h *SetupRecoveryCodeHandler) GetData(r *http.Request, rw http.ResponseWriter, graph *interaction.Graph) (map[string]interface{}, error)

func (*SetupRecoveryCodeHandler) MakeViewModel

func (*SetupRecoveryCodeHandler) ServeHTTP

type SetupRecoveryCodeNode

type SetupRecoveryCodeNode interface {
	GetRecoveryCodes() []string
}

type SetupRecoveryCodeViewModel

type SetupRecoveryCodeViewModel struct {
	RecoveryCodes []string
}

type SetupTOTPEndpointsProvider

type SetupTOTPEndpointsProvider interface {
	Origin() *url.URL
}

type SetupTOTPHandler

type SetupTOTPHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
	Clock                     clock.Clock
	Endpoints                 SetupTOTPEndpointsProvider
}

func (*SetupTOTPHandler) GetData

func (h *SetupTOTPHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*SetupTOTPHandler) MakeViewModel

func (h *SetupTOTPHandler) MakeViewModel(session *webapp.Session, graph *interaction.Graph) (*SetupTOTPViewModel, error)

func (*SetupTOTPHandler) ServeHTTP

func (h *SetupTOTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SetupTOTPNode

type SetupTOTPNode interface {
	GetTOTPAuthenticator() *authenticator.Info
}

type SetupTOTPViewModel

type SetupTOTPViewModel struct {
	ImageURI         htmltemplate.URL
	Secret           string
	AlternativeSteps []viewmodels.AlternativeStep
}

type SetupWhatsappOTPHandler

type SetupWhatsappOTPHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
}

func (*SetupWhatsappOTPHandler) GetData

func (h *SetupWhatsappOTPHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*SetupWhatsappOTPHandler) ServeHTTP

type SignupHandler

type SignupHandler struct {
	ControllerFactory       ControllerFactory
	BaseViewModel           *viewmodels.BaseViewModeler
	AuthenticationViewModel *viewmodels.AuthenticationViewModeler
	FormPrefiller           *FormPrefiller
	Renderer                Renderer
	MeterService            MeterService
	TutorialCookie          TutorialCookie
}

func (*SignupHandler) GetData

func (h *SignupHandler) GetData(r *http.Request, rw http.ResponseWriter, graph *interaction.Graph) (map[string]interface{}, error)

func (*SignupHandler) ServeHTTP

func (h *SignupHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SignupViewModel

type SignupViewModel struct {
	LoginIDInputType string
	LoginIDKey       string
}

func NewSignupViewModel

func NewSignupViewModel(r *http.Request) SignupViewModel

type TesterAppSessionTokenService

type TesterAppSessionTokenService interface {
	Exchange(appSessionToken string) (string, error)
}

type TesterAuthTokensIssuer

type TesterAuthTokensIssuer interface {
	IssueTokensForAuthorizationCode(
		client *config.OAuthClientConfig,
		r protocol.TokenRequest,
	) (protocol.TokenResponse, error)
	IssueAppSessionToken(refreshToken string) (string, *oauth.AppSessionToken, error)
}

type TesterCookieManager

type TesterCookieManager interface {
	ValueCookie(def *httputil.CookieDef, value string) *http.Cookie
}

type TesterHandler

type TesterHandler struct {
	AppID                   config.AppID
	ControllerFactory       ControllerFactory
	OauthEndpointsProvider  oauth.EndpointsProvider
	TesterEndpointsProvider tester.EndpointsProvider
	TesterService           TesterService
	TesterTokenIssuer       TesterAuthTokensIssuer
	OAuthClientResolver     *oauthclient.Resolver
	AppSessionTokenService  TesterAppSessionTokenService
	CookieManager           TesterCookieManager
	Renderer                Renderer
	BaseViewModel           *viewmodels.BaseViewModeler
	UserInfoProvider        TesterUserInfoProvider
	OfflineGrants           TesterOfflineGrantStore
}

func (*TesterHandler) ServeHTTP

func (h *TesterHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TesterOfflineGrantStore

type TesterOfflineGrantStore interface {
	GetOfflineGrant(id string) (*oauth.OfflineGrant, error)
}

type TesterService

type TesterService interface {
	GetToken(
		appID config.AppID,
		tokenID string,
		consume bool,
	) (*tester.TesterToken, error)
	CreateResult(
		appID config.AppID,
		result *tester.TesterResult,
	) (*tester.TesterResult, error)
	GetResult(
		appID config.AppID,
		resultID string,
	) (*tester.TesterResult, error)
}

type TesterState

type TesterState struct {
	Token string `json:"token"`
}

type TesterUserInfoProvider

type TesterUserInfoProvider interface {
	GetUserInfo(userID string, clientLike *oauth.ClientLike) (map[string]interface{}, error)
}

type TesterViewModel

type TesterViewModel struct {
	ReturnURI    string
	UserInfoJson string
}

type TutorialCookie

type TutorialCookie interface {
	Pop(r *http.Request, rw http.ResponseWriter, name httputil.TutorialCookieName) bool
}

type UsePasskeyHandler

type UsePasskeyHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
}

func (*UsePasskeyHandler) GetData

func (h *UsePasskeyHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*UsePasskeyHandler) ServeHTTP

func (h *UsePasskeyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type UserProfile

type UserProfile map[string]interface{}

func GetUserProfile

func GetUserProfile(user *model.User) UserProfile

type VerifyIdentityHandler

type VerifyIdentityHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
	FlashMessage      FlashMessage
	OTPCodeService    OTPCodeService
	Clock             clock.Clock
	Config            *config.AppConfig
}

func (*VerifyIdentityHandler) GetData

func (h *VerifyIdentityHandler) GetData(r *http.Request, rw http.ResponseWriter, action string, maybeSession *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*VerifyIdentityHandler) GetErrorData

func (h *VerifyIdentityHandler) GetErrorData(r *http.Request, rw http.ResponseWriter, err error) (map[string]interface{}, error)

func (*VerifyIdentityHandler) ServeHTTP

type VerifyIdentityNode

type VerifyIdentityNode interface {
	GetVerificationIdentity() *identity.Info
	GetVerificationCodeChannel() string
	GetVerificationCodeTarget() string
	GetVerificationCodeLength() int
	GetRequestedByUser() bool
}

type VerifyIdentitySuccessHandler

type VerifyIdentitySuccessHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
}

func (*VerifyIdentitySuccessHandler) GetData

func (h *VerifyIdentitySuccessHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*VerifyIdentitySuccessHandler) ServeHTTP

type VerifyIdentityViewModel

type VerifyIdentityViewModel struct {
	VerificationCode               string
	VerificationCodeSendCooldown   int
	VerificationCodeLength         int
	VerificationCodeChannel        string
	FailedAttemptRateLimitExceeded bool
	IdentityDisplayID              string
	Action                         string
}

type VerifyLoginLinkOTPHandler

type VerifyLoginLinkOTPHandler struct {
	LoginLinkOTPCodeService     OTPCodeService
	GlobalSessionServiceFactory *GlobalSessionServiceFactory
	ControllerFactory           ControllerFactory
	BaseViewModel               *viewmodels.BaseViewModeler
	AuthenticationViewModel     *viewmodels.AuthenticationViewModeler
	Renderer                    Renderer
	WorkflowEvents              WorkflowWebsocketEventStore
	AuthenticationFlowEvents    AuthenticationFlowWebsocketEventStore
	Config                      *config.AppConfig
}

func (*VerifyLoginLinkOTPHandler) GetData

func (h *VerifyLoginLinkOTPHandler) GetData(r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*VerifyLoginLinkOTPHandler) ServeHTTP

type VerifyLoginLinkOTPViewModel

type VerifyLoginLinkOTPViewModel struct {
	Code       string
	StateQuery LoginLinkOTPPageQueryState
}

func NewVerifyLoginLinkOTPViewModel

func NewVerifyLoginLinkOTPViewModel(r *http.Request) VerifyLoginLinkOTPViewModel

type WeChatAuthViewModel

type WeChatAuthViewModel struct {
	ImageURI          htmltemplate.URL
	WeChatRedirectURI htmltemplate.URL
}

type WebappOAuthClientResolver

type WebappOAuthClientResolver interface {
	ResolveClient(clientID string) *config.OAuthClientConfig
}

type WebsocketHandler

type WebsocketHandler struct {
	AppID         config.AppID
	LoggerFactory *log.Factory
	RedisHandle   *appredis.Handle
	Publisher     *Publisher
}

func (*WebsocketHandler) Accept

func (h *WebsocketHandler) Accept(r *http.Request) (channelName string, err error)

func (*WebsocketHandler) OnRedisSubscribe

func (h *WebsocketHandler) OnRedisSubscribe(r *http.Request) error

func (*WebsocketHandler) ServeHTTP

func (h *WebsocketHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type WebsocketMessage

type WebsocketMessage struct {
	Kind WebsocketMessageKind `json:"kind"`
}

type WebsocketMessageKind

type WebsocketMessageKind string

type WechatAuthHandler

type WechatAuthHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          Renderer
}

func (*WechatAuthHandler) GetData

func (h *WechatAuthHandler) GetData(r *http.Request, w http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*WechatAuthHandler) ServeHTTP

func (h *WechatAuthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type WechatCallbackHandler

type WechatCallbackHandler struct {
	ControllerFactory ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	JSON              JSONResponseWriter
}

WechatCallbackHandler receives WeChat authorization result (code or error) and set it into the web session. Refreshing original auth ui WeChat auth page (/sso/wechat/auth/:alias) will get and consume the result from the web session.

In web, user will use their WeChat app to scan the qr code in auth ui WeChat auth page, then they will complete authorization in their WeChat app and redirect to this endpoint through WeChat. This endpoint will set the result in web session and instruct user go back to the original auth ui. The original auth ui will refresh and proceed.

In native app, the app will receive delegate function call when user click login in with WeChat. Developer needs to implement and obtain WeChat authorization code through native WeChat SDK. After obtaining the code, developer needs to call this endpoint with code through Authgear SDK. At this moment, user can click the proceed button in auth ui WeChat auth page to continue.

func (*WechatCallbackHandler) ServeHTTP

type WhatsappOTPAuthnNode

type WhatsappOTPAuthnNode interface {
	GetAuthenticatorIndex() int
}

type WhatsappOTPHandler

type WhatsappOTPHandler struct {
	Config                    *config.AppConfig
	Clock                     clock.Clock
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	AlternativeStepsViewModel *viewmodels.AlternativeStepsViewModeler
	Renderer                  Renderer
	OTPCodeService            OTPCodeService
	FlashMessage              FlashMessage
}

func (*WhatsappOTPHandler) GetData

func (h *WhatsappOTPHandler) GetData(r *http.Request, rw http.ResponseWriter, session *webapp.Session, graph *interaction.Graph) (map[string]interface{}, error)

func (*WhatsappOTPHandler) ServeHTTP

func (h *WhatsappOTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type WhatsappOTPNode

type WhatsappOTPNode interface {
	GetWhatsappOTPLength() int
	GetPhone() string
	GetOTPKindFactory() otp.KindFactory
}

type WhatsappOTPViewModel

type WhatsappOTPViewModel struct {
	WhatsappOTPTarget              string
	WhatsappOTPCodeLength          int
	WhatsappOTPCodeSendCooldown    int
	FailedAttemptRateLimitExceeded bool
}

type WorkflowWebsocketEventStore

type WorkflowWebsocketEventStore interface {
	Publish(workflowID string, e workflow.Event) error
}

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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