webapp

package
v0.0.0-...-f83813f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 89 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 AuthflowBotProtectionSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_bot_protection_provider_type": { "type": "string" },
			"x_bot_protection_provider_response": { "type": "string" }
		},
		"required": ["x_bot_protection_provider_type", "x_bot_protection_provider_response"]
	}
`)
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(SettingsImplementationSwitcherMiddleware), "*"),

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

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

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

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

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

	NewCSRFMiddlewareLogger,
	wire.Struct(new(CSRFMiddleware), "*"),
	wire.Struct(new(CSRFErrorInstructionHandler), "*"),

	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(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 DirectAccessDisableComponents = web.DirectAccessDisableComponentsHTML
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 SettingsComponents = web.SettingsComponentsHTML
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 TemplateCSRFErrorHTML = template.RegisterHTML(
	"web/authflowv2/csrf_error_page.html",
	Components...,
)
View Source
var TemplateCSRFErrorInstructionHTML = template.RegisterHTML(
	"web/authflowv2/csrf_error_instruction.html",
	Components...,
)
View Source
var TemplateDirectAccessDisable = template.RegisterHTML(
	"web/authflowv2/direct_access_disabled.html",
	DirectAccessDisableComponents...,
)
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 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", oauth.OfflineAccess, 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 ConfigureCSRFErrorInstructionRoute

func ConfigureCSRFErrorInstructionRoute(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 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 GetSettingsUIImplementation

func GetSettingsUIImplementation(ctx context.Context) config.SettingsUIImplementation

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 HandleAccountRecoveryIdentificationBotProtection

func HandleAccountRecoveryIdentificationBotProtection(identification config.AuthenticationFlowAccountRecoveryIdentification, flowResp *authflow.FlowResponse, formData url.Values, input map[string]interface{}) (err error)

As IntentAccountRecoveryFlowStepIdentify has it's own IdentificationData type to narrow down Identification as {"email", "phone"}, we imitate the same logic in HandleIdentificationBotProtection here for account recovery

func HandleAuthenticationBotProtection

func HandleAuthenticationBotProtection(authentication config.AuthenticationFlowAuthentication, flowResp *authflow.FlowResponse, formData url.Values, input map[string]interface{}) (err error)

func HandleCreateAuthenticatorBotProtection

func HandleCreateAuthenticatorBotProtection(authentication config.AuthenticationFlowAuthentication, flowResp *authflow.FlowResponse, formData url.Values, input map[string]interface{}) (err error)

func HandleIdentificationBotProtection

func HandleIdentificationBotProtection(identification config.AuthenticationFlowIdentification, flowResp *authflow.FlowResponse, formData url.Values, input map[string]interface{}) (err error)

func IdentitiesDisplayName

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

func InsertBotProtection

func InsertBotProtection(formData url.Values, input map[string]interface{})

func IsBotProtectionInputValid

func IsBotProtectionInputValid(formData url.Values) bool

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 ValidateBotProtectionInput

func ValidateBotProtectionInput(formData url.Values) error

func WebsocketChannelName

func WebsocketChannelName(appID string, id string) string

func WithSettingsUIImplementation

func WithSettingsUIImplementation(ctx context.Context, impl config.SettingsUIImplementation) context.Context

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(ctx context.Context, 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

func (*AuthflowController) AdvanceDirectly

func (c *AuthflowController) AdvanceDirectly(
	route string,
	screen *webapp.AuthflowScreenWithFlowResponse,
	query url.Values,
) *webapp.Result

func (*AuthflowController) AdvanceToDelayedScreen

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

func (*AuthflowController) AdvanceWithInput

func (c *AuthflowController) AdvanceWithInput(
	ctx context.Context,
	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(
	ctx context.Context,
	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(ctx context.Context, r *http.Request,
	s *webapp.Session,
	sourceScreen *webapp.AuthflowScreen,
	targetResult *webapp.Result,
) (*webapp.AuthflowScreen, error)

func (*AuthflowController) FeedInputWithoutNavigate

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

func (*AuthflowController) Finish

func (*AuthflowController) GetScreen

func (*AuthflowController) HandleOAuthCallback

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

func (*AuthflowController) HandleResumeOfFlow

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

func (*AuthflowController) HandleStartOfFlow

func (c *AuthflowController) HandleStartOfFlow(
	ctx context.Context,
	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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, s *webapp.Session) (result *webapp.Result, err error)

func (*AuthflowController) UpdateWithInput

func (c *AuthflowController) UpdateWithInput(ctx context.Context, 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(ctx context.Context, intent authflow.PublicFlow, sessionOptions *authflow.SessionOptions) (*authflow.ServiceOutput, error)
	Get(ctx context.Context, stateToken string) (*authflow.ServiceOutput, error)
	FeedInput(ctx context.Context, 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(ctx context.Context, w http.ResponseWriter, r *http.Request, err error) error

type AuthflowControllerHandler

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

type AuthflowControllerHandlers

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

func (*AuthflowControllerHandlers) Get

func (*AuthflowControllerHandlers) InlinePreview

func (*AuthflowControllerHandlers) PostAction

type AuthflowControllerInlinePreviewHandler

type AuthflowControllerInlinePreviewHandler func(ctx context.Context, w http.ResponseWriter, r *http.Request) error

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(ctx context.Context, entryID string) (*oauthsession.Entry, error)
}

type AuthflowControllerSAMLSessionService

type AuthflowControllerSAMLSessionService interface {
	Get(ctx context.Context, entryID string) (*samlsession.SAMLSession, error)
}

type AuthflowControllerSessionStore

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

type AuthflowControllerUIInfoResolver

type AuthflowControllerUIInfoResolver interface {
	ResolveForUI(ctx context.Context, 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
	ErrorService      ErrorService
	Endpoints         AuthflowLoginEndpointsProvider
}

func (*AuthflowLoginHandler) GetData

func (h *AuthflowLoginHandler) GetData(
	w http.ResponseWriter,
	r *http.Request,
	s *webapp.Session,
	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(ctx context.Context, screen *webapp.AuthflowScreenWithFlowResponse, r *http.Request, webSessionID string, result *webapp.Result)
	NavigateSelectAccount(result *webapp.Result)
	NavigateResetPasswordSuccessPage() string
	NavigateVerifyBotProtection(result *webapp.Result)
}

type AuthflowNoAuthenticatorHandler

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

func (*AuthflowNoAuthenticatorHandler) ServeHTTP

type AuthflowOAuthCallbackResponse

type AuthflowOAuthCallbackResponse struct {
	Query string
	State *webappoauth.WebappOAuthState
}

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
	OAuthStateStore AuthflowWechatHandlerOAuthStateStore
}

func (*AuthflowWechatHandler) GetData

func (*AuthflowWechatHandler) ServeHTTP

type AuthflowWechatHandlerOAuthStateStore

type AuthflowWechatHandlerOAuthStateStore interface {
	GenerateState(ctx context.Context, state *webappoauth.WebappOAuthState) (stateToken string, err error)
}

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 CSRFErrorInstructionHandler

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

func (*CSRFErrorInstructionHandler) GetData

func (*CSRFErrorInstructionHandler) ServeHTTP

type CSRFMiddleware

type CSRFMiddleware struct {
	Secret                  *config.CSRFKeyMaterials
	TrustProxy              config.TrustProxy
	Cookies                 CookieManager
	Logger                  CSRFMiddlewareLogger
	BaseViewModel           *viewmodels.BaseViewModeler
	Renderer                Renderer
	UIImplementationService CSRFMiddlewareUIImplementationService
	EnvironmentConfig       *config.EnvironmentConfig
}

func (*CSRFMiddleware) Handle

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

type CSRFMiddlewareLogger

type CSRFMiddlewareLogger struct{ *log.Logger }

func NewCSRFMiddlewareLogger

func NewCSRFMiddlewareLogger(lf *log.Factory) CSRFMiddlewareLogger

type CSRFMiddlewareUIImplementationService

type CSRFMiddlewareUIImplementationService interface {
	GetUIImplementation() config.UIImplementation
}

type ChangePasswordViewModel

type ChangePasswordViewModel struct {
	Force bool
}

type ConfirmTerminateOtherSessionsEndpointsProvider

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

type ConfirmTerminateOtherSessionsHandler

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

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) BeforeHandle

func (c *Controller) BeforeHandle(fn func(ctx context.Context) error)

func (*Controller) DeleteSession

func (c *Controller) DeleteSession(ctx context.Context, id string) error

func (*Controller) EntryPointGet

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

func (*Controller) EntryPointPost

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

func (*Controller) EntryPointSession

func (c *Controller) EntryPointSession(ctx context.Context, opts webapp.SessionOptions) *webapp.Session

func (*Controller) Get

func (c *Controller) Get(fn func(ctx context.Context) error)

func (*Controller) GetSession

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

func (*Controller) InteractionGet

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

func (*Controller) InteractionGetWithSession

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

func (*Controller) InteractionOAuthCallback

func (c *Controller) InteractionOAuthCallback(ctx context.Context, oauthInput InputOAuthCallback, oauthState *webappoauth.WebappOAuthState) (*webapp.Result, error)

func (*Controller) InteractionPost

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

func (*Controller) InteractionSession

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

func (*Controller) PostAction

func (c *Controller) PostAction(action string, fn func(ctx context.Context) error)

func (*Controller) RedirectURI

func (c *Controller) RedirectURI() string

func (*Controller) RequireUserID

func (c *Controller) RequireUserID(ctx context.Context) string

func (*Controller) ServeWithDBTx

func (c *Controller) ServeWithDBTx(ctx context.Context)

func (*Controller) ServeWithoutDBTx

func (c *Controller) ServeWithoutDBTx(ctx context.Context)

func (*Controller) UpdateSession

func (c *Controller) UpdateSession(ctx context.Context, 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
	TesterEndpointsProvider tester.EndpointsProvider
	ErrorRenderer           *ErrorRenderer

	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
	IdentityConfig          *config.IdentityConfig
}

func (*EnterLoginIDHandler) GetData

func (h *EnterLoginIDHandler) GetData(ctx context.Context, 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(ctx context.Context, id string) (*identity.Info, error)
	ListCandidates(ctx context.Context, userID string) ([]identity.Candidate, error)
}

type EnterLoginIDViewModel

type EnterLoginIDViewModel struct {
	LoginIDKey       string
	LoginIDType      string
	LoginIDInputType string
	IdentityID       string
	DisplayID        string
	UpdateDisabled   bool
	DeleteDisabled   bool
}

func NewEnterLoginIDViewModel

func NewEnterLoginIDViewModel(r *http.Request, cfg *config.IdentityConfig, info *identity.Info) 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(ctx context.Context, 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 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 ErrorRenderer

type ErrorRenderer struct {
	ErrorService            *webapp.ErrorService
	UIImplementationService ErrorRendererUIImplementationService

	AuthflowV2Navigator ErrorRendererAuthflowV2Navigator
}

func (*ErrorRenderer) MakeAuthflowErrorResult

func (s *ErrorRenderer) MakeAuthflowErrorResult(ctx context.Context, w http.ResponseWriter, r *http.Request, u url.URL, err error) *webapp.Result

func (*ErrorRenderer) RenderError

func (s *ErrorRenderer) RenderError(ctx context.Context, w http.ResponseWriter, r *http.Request, err error)

type ErrorRendererAuthflowV2Navigator

type ErrorRendererAuthflowV2Navigator interface {
	NavigateNonRecoverableError(r *http.Request, u *url.URL, e error)
}

type ErrorRendererUIImplementationService

type ErrorRendererUIImplementationService interface {
	GetUIImplementation() config.UIImplementation
}

type ErrorService

type ErrorService interface {
	HasError(ctx context.Context, r *http.Request) bool
}

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(ctx context.Context, sessionID string) (session *webapp.Session, err error)

func (*GlobalSessionService) UpdateSession

func (s *GlobalSessionService) UpdateSession(ctx context.Context, 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
	AuthflowV2  http.Handler
}

func (*ImplementationSwitcherHandler) ServeHTTP

type ImplementationSwitcherMiddleware

type ImplementationSwitcherMiddleware struct {
	UIImplementationService ImplementationSwitcherMiddlewareUIImplementationService
}

func (*ImplementationSwitcherMiddleware) Handle

type ImplementationSwitcherMiddlewareUIImplementationService

type ImplementationSwitcherMiddlewareUIImplementationService interface {
	GetUIImplementation() config.UIImplementation
}

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
	Query         string
}

func (*InputOAuthCallback) GetProviderAlias

func (i *InputOAuthCallback) GetProviderAlias() string

func (*InputOAuthCallback) GetQuery

func (i *InputOAuthCallback) GetQuery() 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
	ErrorService            ErrorService
}

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(ctx context.Context, 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
	SAMLConfig            *config.SAMLConfig
	SessionManager        LogoutSessionManager
	BaseViewModel         *viewmodels.BaseViewModeler
	Renderer              Renderer
	OAuthClientResolver   WebappOAuthClientResolver
	SAMLSLOSessionService SAMLSLOSessionService
	SAMLSLOService        SAMLSLOService
}

func (*LogoutHandler) ServeHTTP

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

type LogoutSessionManager

type LogoutSessionManager interface {
	Logout(ctx context.Context, s session.SessionBase, w http.ResponseWriter) ([]session.ListableSession, error)
}

type MeterService

type MeterService interface {
	TrackPageView(ctx context.Context, visitorID string, pageType meter.PageType) error
}

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() *url.URL
}

type OAuthEntrypointHandler

type OAuthEntrypointHandler struct {
	Endpoints OAuthEntrypointEndpointsProvider
}

func (*OAuthEntrypointHandler) ServeHTTP

type OTPCodeService

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

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

type PageService

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

type PanicMiddleware

type PanicMiddleware struct {
	ErrorService            *webapp.ErrorService
	Logger                  PanicMiddlewareLogger
	BaseViewModel           *viewmodels.BaseViewModeler
	Renderer                Renderer
	Endpoints               PanicMiddlewareEndpointsProvider
	UIImplementationService PanicMiddlewareUIImplementationService
}

func (*PanicMiddleware) Handle

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

type PanicMiddlewareEndpointsProvider

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

type PanicMiddlewareLogger

type PanicMiddlewareLogger struct{ *log.Logger }

func NewPanicMiddlewareLogger

func NewPanicMiddlewareLogger(lf *log.Factory) PanicMiddlewareLogger

type PanicMiddlewareUIImplementationService

type PanicMiddlewareUIImplementationService interface {
	GetUIImplementation() config.UIImplementation
}

type PasskeyCreationOptionsHandler

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

func (*PasskeyCreationOptionsHandler) ServeHTTP

type PasskeyCreationOptionsService

type PasskeyCreationOptionsService interface {
	MakeCreationOptions(ctx context.Context, 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(ctx context.Context) (*model.WebAuthnRequestOptions, error)
	MakeModalRequestOptions(ctx context.Context) (*model.WebAuthnRequestOptions, error)
	MakeModalRequestOptionsWithUser(ctx context.Context, 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(ctx context.Context, 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{})
	RenderHTMLStatus(w http.ResponseWriter, r *http.Request, status int, tpl *template.HTML, 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(ctx context.Context, 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(ctx context.Context, 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) RenderHTMLStatus

func (r *ResponseRenderer) RenderHTMLStatus(w http.ResponseWriter, req *http.Request, status int, 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 SAMLSLOService

type SAMLSLOService interface {
	SendSLORequest(
		ctx context.Context,
		rw http.ResponseWriter,
		r *http.Request,
		sloSession *samlslosession.SAMLSLOSession,
		sp *config.SAMLServiceProviderConfig,
	) error
}

type SAMLSLOSessionService

type SAMLSLOSessionService interface {
	Get(ctx context.Context, sessionID string) (entry *samlslosession.SAMLSLOSession, err error)
	Save(ctx context.Context, session *samlslosession.SAMLSLOSession) (err error)
}

type SSOCallbackHandler

type SSOCallbackHandler struct {
	AuthflowController *AuthflowController
	ControllerFactory  ControllerFactory
	ErrorRenderer      *ErrorRenderer
	OAuthStateStore    SSOCallbackHandlerOAuthStateStore
	AccountManagement  *accountmanagement.Service
}

func (*SSOCallbackHandler) ServeHTTP

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

type SSOCallbackHandlerOAuthStateStore

type SSOCallbackHandlerOAuthStateStore interface {
	PopAndRecoverState(ctx context.Context, stateToken string) (state *webappoauth.WebappOAuthState, err error)
}

type SelectAccountAuthenticationInfoService

type SelectAccountAuthenticationInfoService interface {
	Save(ctx context.Context, entry *authenticationinfo.Entry) error
}

type SelectAccountHandler

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

func (*SelectAccountHandler) GetData

func (h *SelectAccountHandler) GetData(ctx context.Context, 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(ctx context.Context, userID string) ([]*identity.Info, error)
}

type SelectAccountUIInfoResolver

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

type SelectAccountUserFacade

type SelectAccountUserFacade interface {
	GetUserIDsByLoginHint(ctx context.Context, hint *oauth.LoginHint) ([]string, error)
}

type SelectAccountUserService

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

type SelectAccountViewModel

type SelectAccountViewModel struct {
	IdentityDisplayName string
	UserProfile         UserProfile
}

type SessionStore

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

type SettingsAuthenticatorService

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

type SettingsAuthorizationService

type SettingsAuthorizationService interface {
	GetByID(ctx context.Context, id string) (*oauth.Authorization, error)
	ListByUser(ctx context.Context, userID string, filters ...oauth.AuthorizationFilter) ([]*oauth.Authorization, error)
	Delete(ctx context.Context, 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(ctx context.Context, 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 SettingsDeleteAccountAuthenticationInfoService

type SettingsDeleteAccountAuthenticationInfoService interface {
	Save(ctx context.Context, entry *authenticationinfo.Entry) (err error)
}

type SettingsDeleteAccountHandler

type SettingsDeleteAccountHandler struct {
	ControllerFactory         ControllerFactory
	BaseViewModel             *viewmodels.BaseViewModeler
	Renderer                  Renderer
	AccountDeletion           *config.AccountDeletionConfig
	Clock                     clock.Clock
	Users                     SettingsDeleteAccountUserService
	Cookies                   CookieManager
	OAuthSessions             SettingsDeleteAccountOAuthSessionService
	Sessions                  SettingsDeleteAccountSessionStore
	SessionCookie             webapp.SessionCookieDef
	AuthenticationInfoService SettingsDeleteAccountAuthenticationInfoService
}

func (*SettingsDeleteAccountHandler) GetData

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

func (*SettingsDeleteAccountHandler) ServeHTTP

type SettingsDeleteAccountOAuthSessionService

type SettingsDeleteAccountOAuthSessionService interface {
	Get(ctx context.Context, entryID string) (*oauthsession.Entry, error)
	Save(ctx context.Context, entry *oauthsession.Entry) error
}

type SettingsDeleteAccountSessionStore

type SettingsDeleteAccountSessionStore interface {
	Create(ctx context.Context, session *webapp.Session) (err error)
	Delete(ctx context.Context, id string) (err error)
	Update(ctx context.Context, session *webapp.Session) (err error)
}

type SettingsDeleteAccountSuccessAuthenticationInfoService

type SettingsDeleteAccountSuccessAuthenticationInfoService interface {
	Get(ctx context.Context, entryID string) (entry *authenticationinfo.Entry, err error)
}

type SettingsDeleteAccountSuccessHandler

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

func (*SettingsDeleteAccountSuccessHandler) GetData

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

func (*SettingsDeleteAccountSuccessHandler) ServeHTTP

type SettingsDeleteAccountSuccessUIInfoResolver

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

type SettingsDeleteAccountUserService

type SettingsDeleteAccountUserService interface {
	ScheduleDeletionByEndUser(ctx context.Context, userID string) error
}

type SettingsDeleteAccountViewModel

type SettingsDeleteAccountViewModel struct {
	ExpectedAccountDeletionTime time.Time
}

type SettingsEndpointsProvider

type SettingsEndpointsProvider interface {
	SSOCallbackURL(provider string) *url.URL
}

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(ctx context.Context, 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(ctx context.Context, r *http.Request, rw http.ResponseWriter) (map[string]interface{}, error)

func (*SettingsIdentityHandler) ServeHTTP

type SettingsIdentityService

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

type SettingsIdentityViewModel

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

type SettingsImplementationSwitcherHandler

type SettingsImplementationSwitcherHandler struct {
	SettingV1 http.Handler
	SettingV2 http.Handler
}

func (*SettingsImplementationSwitcherHandler) ServeHTTP

type SettingsImplementationSwitcherMiddleware

type SettingsImplementationSwitcherMiddleware struct {
	UIImplementationService SettingsImplementationSwitcherMiddlewareUIImplementationService
}

func (*SettingsImplementationSwitcherMiddleware) Handle

type SettingsImplementationSwitcherMiddlewareUIImplementationService

type SettingsImplementationSwitcherMiddlewareUIImplementationService interface {
	GetSettingsUIImplementation() config.SettingsUIImplementation
}

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(ctx context.Context, userID string) ([]*mfa.RecoveryCode, error)
	InvalidateAllDeviceTokens(ctx context.Context, userID string) error
}

type SettingsOAuthStateStore

type SettingsOAuthStateStore interface {
	GenerateState(ctx context.Context, state *webappoauth.WebappOAuthState) (stateToken string, err error)
}

type SettingsOOBOTPHandler

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

func (*SettingsOOBOTPHandler) GetData

func (h *SettingsOOBOTPHandler) GetData(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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
}

func (*SettingsProfileEditHandler) GetData

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

func (*SettingsProfileEditHandler) ServeHTTP

type SettingsProfileEditStdAttrsService

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

type SettingsProfileEditUserService

type SettingsProfileEditUserService interface {
	GetRaw(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, sessions []session.ListableSession, currentSession session.ResolvedSession) ([]*sessionlisting.Session, error)
}

type SettingsSessionManager

type SettingsSessionManager interface {
	List(ctx context.Context, userID string) ([]session.ListableSession, error)
	Get(ctx context.Context, id string) (session.ListableSession, error)
	RevokeWithEvent(ctx context.Context, s session.SessionBase, isTermination bool, isAdminAPI bool) error
	TerminateAllExcept(ctx context.Context, userID string, currentSession session.ResolvedSession, 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 (*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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, appSessionToken string) (string, error)
}

type TesterAuthTokensIssuer

type TesterAuthTokensIssuer interface {
	IssueTokensForAuthorizationCode(
		ctx context.Context,
		client *config.OAuthClientConfig,
		r protocol.TokenRequest,
	) (protocol.TokenResponse, error)
	IssueAppSessionToken(ctx context.Context, 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           TesterOfflineGrantService
}

func (*TesterHandler) ServeHTTP

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

type TesterOfflineGrantService

type TesterOfflineGrantService interface {
	GetOfflineGrant(ctx context.Context, id string) (*oauth.OfflineGrant, error)
}

type TesterService

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

type TesterState

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

type TesterUserInfoProvider

type TesterUserInfoProvider interface {
	GetUserInfo(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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
	OAuthStateStore   WechatCallbackHandlerOAuthStateStore
}

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 WechatCallbackHandlerOAuthStateStore

type WechatCallbackHandlerOAuthStateStore interface {
	PopAndRecoverState(ctx context.Context, stateToken string) (state *webappoauth.WebappOAuthState, err error)
}

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(ctx context.Context, 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.DeprecatedKindFactory
}

type WhatsappOTPViewModel

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

type WorkflowWebsocketEventStore

type WorkflowWebsocketEventStore interface {
	Publish(ctx context.Context, 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