authflowv2

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

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

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

Documentation

Index

Constants

View Source
const (
	AuthflowV2RouteLogin         = "/login"
	AuthflowV2RouteSignup        = "/signup"
	AuthflowV2RoutePromote       = "/flows/promote_user"
	AuthflowV2RouteReauth        = "/reauth"
	AuthflowV2RouteSelectAccount = "/authflow/v2/select_account"
	// AuthflowV2RouteSignupLogin is login because login page has passkey.
	AuthflowV2RouteSignupLogin = AuthflowV2RouteLogin

	AuthflowV2RouteTerminateOtherSessions = "/authflow/v2/terminate_other_sessions"
	// nolint: gosec
	AuthflowV2RoutePromptCreatePasskey = "/authflow/v2/prompt_create_passkey"
	AuthflowV2RouteViewRecoveryCode    = "/authflow/v2/view_recovery_code"
	// nolint: gosec
	AuthflowV2RouteCreatePassword = "/authflow/v2/create_password"
	// nolint: gosec
	AuthflowV2RouteChangePassword = "/authflow/v2/change_password"
	// nolint: gosec
	AuthflowV2RouteChangePasswordSuccess = "/authflow/v2/change_password/success"
	// nolint: gosec
	AuthflowV2RouteEnterPassword     = "/authflow/v2/enter_password"
	AuthflowV2RouteEnterRecoveryCode = "/authflow/v2/enter_recovery_code"
	AuthflowV2RouteEnterOOBOTP       = "/authflow/v2/enter_oob_otp"
	AuthflowV2RouteOOBOTPLink        = "/authflow/v2/oob_otp_link"
	AuthflowV2RouteVerifyLink        = "/authflow/v2/verify_login_link"
	AuthflowV2RouteEnterTOTP         = "/authflow/v2/enter_totp"
	AuthflowV2RouteSetupTOTP         = "/authflow/v2/setup_totp"
	AuthflowV2RouteSetupOOBOTP       = "/authflow/v2/setup_oob_otp"
	// nolint: gosec
	AuthflowV2RouteUsePasskey = "/authflow/v2/use_passkey"
	// nolint: gosec
	AuthflowV2RouteForgotPassword = "/authflow/v2/forgot_password"
	// nolint: gosec
	AuthflowV2RouteForgotPasswordOTP = "/authflow/v2/forgot_password/otp"
	// nolint: gosec
	AuthflowV2RouteForgotPasswordLinkSent = "/authflow/v2/forgot_password/link/sent"
	// nolint: gosec
	AuthflowV2RouteResetPassword = "/authflow/v2/reset_password"
	// nolint: gosec
	AuthflowV2RouteResetPasswordSuccess = "/authflow/v2/reset_password/success"
	AuthflowV2RouteWechat               = "/authflow/v2/wechat"

	// The following routes are dead ends.
	AuthflowV2RouteAccountStatus   = "/authflow/v2/account_status"
	AuthflowV2RouteNoAuthenticator = "/authflow/v2/no_authenticator"

	AuthflowV2RouteFinishFlow = "/authflow/v2/finish"
)
View Source
const LoginLinkOTPPageQueryStateKey = "state"

Variables

View Source
var AuthflowChangePasswordSchema = 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 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 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 AuthflowV2ForgotPasswordSchema = 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 AuthflowV2SignupLoginIDSchema = 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 DependencySet = wire.NewSet(
	wire.Struct(new(InternalAuthflowV2SignupLoginHandler), "*"),
	wire.Struct(new(AuthflowV2LoginHandler), "*"),
	wire.Struct(new(AuthflowV2SignupHandler), "*"),
	wire.Struct(new(AuthflowV2ReauthHandler), "*"),
	wire.Struct(new(AuthflowV2EnterPasswordHandler), "*"),
	wire.Struct(new(AuthflowV2EnterOOBOTPHandler), "*"),
	wire.Struct(new(AuthflowV2SetupOOBOTPHandler), "*"),
	wire.Struct(new(AuthflowV2ViewRecoveryCodeHandler), "*"),
	wire.Struct(new(AuthflowV2ErrorHandler), "*"),
	wire.Struct(new(AuthflowV2NoAuthenticatorHandler), "*"),
	wire.Struct(new(AuthflowV2CreatePasswordHandler), "*"),
	wire.Struct(new(AuthflowV2AccountStatusHandler), "*"),
	wire.Struct(new(AuthflowV2NotFoundHandler), "*"),
	wire.Struct(new(AuthflowV2SelectAccountHandler), "*"),
	wire.Struct(new(AuthflowV2EnterRecoveryCodeHandler), "*"),
	wire.Struct(new(AuthflowV2ChangePasswordHandler), "*"),
	wire.Struct(new(AuthflowV2ChangePasswordSuccessHandler), "*"),
	wire.Struct(new(AuthflowV2ForgotPasswordHandler), "*"),
	wire.Struct(new(AuthflowV2ForgotPasswordLinkSentHandler), "*"),
	wire.Struct(new(AuthflowV2ForgotPasswordOTPHandler), "*"),
	wire.Struct(new(AuthflowV2ResetPasswordHandler), "*"),
	wire.Struct(new(AuthflowV2ResetPasswordSuccessHandler), "*"),
	wire.Struct(new(AuthflowV2SetupTOTPHandler), "*"),
	wire.Struct(new(AuthflowV2EnterTOTPHandler), "*"),
	wire.Struct(new(AuthflowV2OOBOTPLinkHandler), "*"),
	wire.Struct(new(AuthflowV2VerifyLoginLinkOTPHandler), "*"),
	wire.Struct(new(AuthflowV2PromptCreatePasskeyHandler), "*"),
	wire.Struct(new(AuthflowV2UsePasskeyHandler), "*"),
	wire.Struct(new(AuthflowV2TerminateOtherSessionsHandler), "*"),
	wire.Struct(new(AuthflowV2PromoteHandler), "*"),
	wire.Struct(new(AuthflowV2FinishFlowHandler), "*"),
	wire.Struct(new(AuthflowV2WechatHandler), "*"),
)
View Source
var TemplateWebAuthflowAccountStatusHTML = template.RegisterHTML(
	"web/authflowv2/account_status.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowChangePasswordHTML = template.RegisterHTML(
	"web/authflowv2/change_password.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowChangePasswordSuccessHTML = template.RegisterHTML(
	"web/authflowv2/change_password_success.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowCreatePasswordHTML = template.RegisterHTML(
	"web/authflowv2/create_password.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowEnterOOBOTPHTML = template.RegisterHTML(
	"web/authflowv2/enter_oob_otp.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowEnterPasswordHTML = template.RegisterHTML(
	"web/authflowv2/enter_password.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowEnterRecoveryCodeHTML = template.RegisterHTML(
	"web/authflowv2/enter_recovery_code.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowEnterTOTPHTML = template.RegisterHTML(
	"web/authflowv2/enter_totp.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowForgotPasswordOTPHTML = template.RegisterHTML(
	"web/authflowv2/forgot_password_otp.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowLoginHTML = template.RegisterHTML(
	"web/authflowv2/login.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowOOBOTPLinkHTML = template.RegisterHTML(
	"web/authflowv2/oob_otp_link.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowPromptCreatePasskeyHTML = template.RegisterHTML(
	"web/authflowv2/prompt_create_passkey.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowResetPasswordHTML = template.RegisterHTML(
	"web/authflowv2/reset_password.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowResetPasswordSuccessHTML = template.RegisterHTML(
	"web/authflowv2/reset_password_success.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowSetupOOBOTPHTML = template.RegisterHTML(
	"web/authflowv2/setup_oob_otp.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowSetupTOTPHTML = template.RegisterHTML(
	"web/authflowv2/setup_totp.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowSetupTOTPVerifyHTML = template.RegisterHTML(
	"web/authflowv2/setup_totp_verify.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowTerminateOtherSessionsHTML = template.RegisterHTML(
	"web/authflowv2/terminate_other_sessions.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowUsePasskeyHTML = template.RegisterHTML(
	"web/authflowv2/use_passkey.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowV2ForgotPasswordHTML = template.RegisterHTML(
	"web/authflowv2/forgot_password.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowV2ForgotPasswordLinkSentHTML = template.RegisterHTML(
	"web/authflowv2/forgot_password_link_sent.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowV2NoAuthenticatorHTML = template.RegisterHTML(
	"web/authflowv2/no_authenticator.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowV2SignupHTML = template.RegisterHTML(
	"web/authflowv2/signup.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowViewRecoveryCodeHTML = template.RegisterHTML(
	"web/authflowv2/view_recovery_code.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebAuthflowWechatHTML = template.RegisterHTML(
	"web/authflowv2/wechat.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebFatalErrorHTML = handlerwebapp.TemplateV2WebFatalErrorHTML
View Source
var TemplateWebNotFoundHTML = template.RegisterHTML(
	"web/authflowv2/not_found.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebSelectAccountHTML = template.RegisterHTML(
	"web/authflowv2/select_account.html",
	handlerwebapp.Components...,
)
View Source
var TemplateWebVerifyLoginLinkOTPHTML = template.RegisterHTML(
	"web/authflowv2/verify_login_link.html",
	handlerwebapp.Components...,
)
View Source
var VerifyLoginLinkOTPSchema = validation.NewSimpleSchema(`
	{
		"type": "object",
		"properties": {
			"x_oob_otp_code": { "type": "string" }
		},
		"required": ["x_oob_otp_code"]
	}
`)

Functions

func ConfigureAuthflowV2AccountStatusRoute

func ConfigureAuthflowV2AccountStatusRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2ChangePasswordSuccessRoute

func ConfigureAuthflowV2ChangePasswordSuccessRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2CreatePasswordRoute

func ConfigureAuthflowV2CreatePasswordRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2EnterOOBOTPRoute

func ConfigureAuthflowV2EnterOOBOTPRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2EnterPasswordRoute

func ConfigureAuthflowV2EnterPasswordRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2EnterRecoveryCodeRoute

func ConfigureAuthflowV2EnterRecoveryCodeRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2EnterTOTPRoute

func ConfigureAuthflowV2EnterTOTPRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2ErrorRoute

func ConfigureAuthflowV2ErrorRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2ForgotPasswordLinkSentRoute

func ConfigureAuthflowV2ForgotPasswordLinkSentRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2ForgotPasswordOTPRoute

func ConfigureAuthflowV2ForgotPasswordOTPRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2ForgotPasswordRoute

func ConfigureAuthflowV2ForgotPasswordRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2NoAuthenticatorRoute

func ConfigureAuthflowV2NoAuthenticatorRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2PromoteRoute

func ConfigureAuthflowV2PromoteRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2PromptCreatePasskeyRoute

func ConfigureAuthflowV2PromptCreatePasskeyRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2ReauthRoute

func ConfigureAuthflowV2ReauthRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2ResetPasswordRoute

func ConfigureAuthflowV2ResetPasswordRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2ResetPasswordSuccessRoute

func ConfigureAuthflowV2ResetPasswordSuccessRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2SelectAccountRoute

func ConfigureAuthflowV2SelectAccountRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2SetupOOBOTPRoute

func ConfigureAuthflowV2SetupOOBOTPRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2SetupTOTPRoute

func ConfigureAuthflowV2SetupTOTPRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2TerminateOtherSessionsRoute

func ConfigureAuthflowV2TerminateOtherSessionsRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2UsePasskeyRoute

func ConfigureAuthflowV2UsePasskeyRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2VerifyLoginLinkOTPRoute

func ConfigureAuthflowV2VerifyLoginLinkOTPRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2ViewRecoveryCodeRoute

func ConfigureAuthflowV2ViewRecoveryCodeRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowV2WechatRoute

func ConfigureAuthflowV2WechatRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowv2ChangePasswordRoute

func ConfigureAuthflowv2ChangePasswordRoute(route httproute.Route) httproute.Route

func ConfigureAuthflowv2FinishFlowRoute

func ConfigureAuthflowv2FinishFlowRoute(route httproute.Route) httproute.Route

func ConfigureV2AuthflowOOBOTPLinkRoute

func ConfigureV2AuthflowOOBOTPLinkRoute(route httproute.Route) httproute.Route

Types

type AuthFlowV2ForgotPasswordAlternative

type AuthFlowV2ForgotPasswordAlternative struct {
	AlternativeType AuthFlowV2ForgotPasswordAlternativeType
	Href            string
}

type AuthFlowV2ForgotPasswordAlternativeType

type AuthFlowV2ForgotPasswordAlternativeType string
const (
	AuthFlowV2ForgotPasswordAlternativeTypeEmail AuthFlowV2ForgotPasswordAlternativeType = "email"
	AuthFlowV2ForgotPasswordAlternativeTypePhone AuthFlowV2ForgotPasswordAlternativeType = "phone"
)

type AuthFlowV2ForgotPasswordViewModel

type AuthFlowV2ForgotPasswordViewModel struct {
	LoginIDInputType     ForgotPasswordLoginIDInputType
	LoginID              string
	PhoneLoginIDEnabled  bool
	EmailLoginIDEnabled  bool
	LoginIDDisabled      bool
	OTPForm              string
	RequiresLoginIDInput bool
	Alternatives         []*AuthFlowV2ForgotPasswordAlternative
}

func NewAuthFlowV2ForgotPasswordViewModel

func NewAuthFlowV2ForgotPasswordViewModel(
	r *http.Request,
	initialScreen *webapp.AuthflowScreenWithFlowResponse,
	selectDestinationScreen *webapp.AuthflowScreenWithFlowResponse) AuthFlowV2ForgotPasswordViewModel

type AuthenticationFlowWebsocketEventStore

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

type AuthflowCreatePasswordViewModel

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

type AuthflowEnterOOBOTPViewModel

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

type AuthflowEnterPasswordViewModel

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

type AuthflowForgotPasswordOTPAlternativeChannel

type AuthflowForgotPasswordOTPAlternativeChannel struct {
	Index   int
	Channel declarative.AccountRecoveryChannel
}

type AuthflowForgotPasswordOTPViewModel

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

type AuthflowLoginEndpointsProvider

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

type AuthflowLoginViewModel

type AuthflowLoginViewModel struct {
	AllowLoginOnly bool
}

func NewAuthflowLoginViewModel

func NewAuthflowLoginViewModel(allowLoginOnly bool) AuthflowLoginViewModel

type AuthflowOOBOTPLinkViewModel

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

type AuthflowSetupOOBOTPViewModel

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

type AuthflowSetupTOTPViewModel

type AuthflowSetupTOTPViewModel struct {
	Secret   string
	ImageURI htmltemplate.URL
}

type AuthflowV2AccountStatusHandler

type AuthflowV2AccountStatusHandler struct {
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      handlerwebapp.Renderer
}

func (*AuthflowV2AccountStatusHandler) ServeHTTP

type AuthflowV2ChangePasswordHandler

type AuthflowV2ChangePasswordHandler struct {
	Controller              *handlerwebapp.AuthflowController
	Navigator               AuthflowV2ChangePasswordNavigator
	BaseViewModel           *viewmodels.BaseViewModeler
	ChangePasswordViewModel *viewmodels.ChangePasswordViewModeler
	Renderer                handlerwebapp.Renderer
}

func (*AuthflowV2ChangePasswordHandler) GetData

func (*AuthflowV2ChangePasswordHandler) ServeHTTP

type AuthflowV2ChangePasswordNavigator

type AuthflowV2ChangePasswordNavigator interface {
	NavigateChangePasswordSuccessPage(s *webapp.AuthflowScreen, r *http.Request, webSessionID string) (result *webapp.Result)
}

type AuthflowV2ChangePasswordSuccessHandler

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

func (*AuthflowV2ChangePasswordSuccessHandler) GetData

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

func (*AuthflowV2ChangePasswordSuccessHandler) ServeHTTP

type AuthflowV2ChangePasswordSuccessViewModel

type AuthflowV2ChangePasswordSuccessViewModel struct {
	CanBackToSignIn bool
}

type AuthflowV2CreatePasswordHandler

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

func (*AuthflowV2CreatePasswordHandler) GetData

func (*AuthflowV2CreatePasswordHandler) ServeHTTP

type AuthflowV2EnterOOBOTPHandler

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

func (*AuthflowV2EnterOOBOTPHandler) GetData

func (*AuthflowV2EnterOOBOTPHandler) ServeHTTP

type AuthflowV2EnterPasswordHandler

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

func (*AuthflowV2EnterPasswordHandler) GetData

func (*AuthflowV2EnterPasswordHandler) ServeHTTP

type AuthflowV2EnterRecoveryCodeHandler

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

func (*AuthflowV2EnterRecoveryCodeHandler) GetData

func (*AuthflowV2EnterRecoveryCodeHandler) ServeHTTP

type AuthflowV2EnterTOTPHandler

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

func (*AuthflowV2EnterTOTPHandler) GetData

func (*AuthflowV2EnterTOTPHandler) ServeHTTP

type AuthflowV2ErrorHandler

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

func (*AuthflowV2ErrorHandler) GetData

func (*AuthflowV2ErrorHandler) ServeHTTP

type AuthflowV2FinishFlowHandler

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

func (*AuthflowV2FinishFlowHandler) ServeHTTP

type AuthflowV2ForgotPasswordHandler

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

func (*AuthflowV2ForgotPasswordHandler) GetData

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

func (*AuthflowV2ForgotPasswordHandler) ServeHTTP

type AuthflowV2ForgotPasswordLinkSentHandler

type AuthflowV2ForgotPasswordLinkSentHandler struct {
	Controller    *handlerwebapp.AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      handlerwebapp.Renderer
	Clock         clock.Clock
}

func (*AuthflowV2ForgotPasswordLinkSentHandler) GetData

func (*AuthflowV2ForgotPasswordLinkSentHandler) ServeHTTP

type AuthflowV2ForgotPasswordLinkSentViewModel

type AuthflowV2ForgotPasswordLinkSentViewModel struct {
	MaskedDisplayName string
	ResendCooldown    int
}

type AuthflowV2ForgotPasswordOTPHandler

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

func (*AuthflowV2ForgotPasswordOTPHandler) ServeHTTP

type AuthflowV2LoginHandler

type AuthflowV2LoginHandler struct {
	SignupLoginHandler   InternalAuthflowV2SignupLoginHandler
	UIConfig             *config.UIConfig
	AuthenticationConfig *config.AuthenticationConfig
	Controller           *handlerwebapp.AuthflowController
	BaseViewModel        *viewmodels.BaseViewModeler
	AuthflowViewModel    *viewmodels.AuthflowViewModeler
	Renderer             handlerwebapp.Renderer
	MeterService         handlerwebapp.MeterService
	TutorialCookie       handlerwebapp.TutorialCookie
	ErrorCookie          handlerwebapp.ErrorCookie
	Endpoints            AuthflowLoginEndpointsProvider
}

func (*AuthflowV2LoginHandler) GetData

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

func (*AuthflowV2LoginHandler) ServeHTTP

type AuthflowV2Navigator

type AuthflowV2Navigator struct {
	Endpoints   AuthflowV2NavigatorEndpointsProvider
	UIConfig    *config.UIConfig
	ErrorCookie *webapp.ErrorCookie
}

func (*AuthflowV2Navigator) Navigate

func (n *AuthflowV2Navigator) Navigate(s *webapp.AuthflowScreenWithFlowResponse, r *http.Request, webSessionID string, result *webapp.Result)

func (*AuthflowV2Navigator) NavigateChangePasswordSuccessPage

func (n *AuthflowV2Navigator) NavigateChangePasswordSuccessPage(s *webapp.AuthflowScreen, r *http.Request, webSessionID string) (result *webapp.Result)

func (*AuthflowV2Navigator) NavigateNonRecoverableError

func (n *AuthflowV2Navigator) NavigateNonRecoverableError(r *http.Request, u *url.URL, e error)

func (*AuthflowV2Navigator) NavigateResetPasswordSuccessPage

func (n *AuthflowV2Navigator) NavigateResetPasswordSuccessPage() string

func (*AuthflowV2Navigator) NavigateSelectAccount

func (n *AuthflowV2Navigator) NavigateSelectAccount(result *webapp.Result)

type AuthflowV2NavigatorEndpointsProvider

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

type AuthflowV2NoAuthenticatorHandler

type AuthflowV2NoAuthenticatorHandler struct {
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      handlerwebapp.Renderer
}

func (*AuthflowV2NoAuthenticatorHandler) ServeHTTP

type AuthflowV2NotFoundHandler

type AuthflowV2NotFoundHandler struct {
	ControllerFactory handlerwebapp.ControllerFactory
	BaseViewModel     *viewmodels.BaseViewModeler
	Renderer          handlerwebapp.Renderer
}

func (*AuthflowV2NotFoundHandler) GetData

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

func (*AuthflowV2NotFoundHandler) ServeHTTP

type AuthflowV2OOBOTPLinkHandler

type AuthflowV2OOBOTPLinkHandler struct {
	Controller    *handlerwebapp.AuthflowController
	BaseViewModel *viewmodels.BaseViewModeler
	Renderer      handlerwebapp.Renderer
	Clock         clock.Clock
}

func (*AuthflowV2OOBOTPLinkHandler) GetData

func (*AuthflowV2OOBOTPLinkHandler) ServeHTTP

type AuthflowV2PromoteEndpointsProvider

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

type AuthflowV2PromoteHandler

type AuthflowV2PromoteHandler struct {
	Controller        *handlerwebapp.AuthflowController
	BaseViewModel     *viewmodels.BaseViewModeler
	AuthflowViewModel *viewmodels.AuthflowViewModeler
	Renderer          handlerwebapp.Renderer
	Endpoints         AuthflowV2PromoteEndpointsProvider
}

func (*AuthflowV2PromoteHandler) GetData

func (*AuthflowV2PromoteHandler) ServeHTTP

type AuthflowV2PromptCreatePasskeyHandler

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

func (*AuthflowV2PromptCreatePasskeyHandler) GetData

func (*AuthflowV2PromptCreatePasskeyHandler) ServeHTTP

type AuthflowV2PromptCreatePasskeyViewModel

type AuthflowV2PromptCreatePasskeyViewModel struct {
	CreationOptionsJSON string
}

type AuthflowV2ReauthHandler

type AuthflowV2ReauthHandler struct {
	Controller *handlerwebapp.AuthflowController

	AuthflowNavigator handlerwebapp.AuthflowNavigator
}

func (*AuthflowV2ReauthHandler) ServeHTTP

type AuthflowV2ResetPasswordHandler

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

func (*AuthflowV2ResetPasswordHandler) GetData

func (*AuthflowV2ResetPasswordHandler) GetErrorData

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

func (*AuthflowV2ResetPasswordHandler) ServeHTTP

type AuthflowV2ResetPasswordSuccessHandler

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

func (*AuthflowV2ResetPasswordSuccessHandler) GetData

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

func (*AuthflowV2ResetPasswordSuccessHandler) ServeHTTP

type AuthflowV2ResetPasswordSuccessViewModel

type AuthflowV2ResetPasswordSuccessViewModel struct {
	CanBackToSignIn bool
}

type AuthflowV2SelectAccountHandler

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

func (*AuthflowV2SelectAccountHandler) GetData

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

func (*AuthflowV2SelectAccountHandler) ServeHTTP

nolint: gocognit

type AuthflowV2SetupOOBOTPHandler

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

func (*AuthflowV2SetupOOBOTPHandler) GetData

func (*AuthflowV2SetupOOBOTPHandler) ServeHTTP

type AuthflowV2SetupTOTPHandler

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

func (*AuthflowV2SetupTOTPHandler) GetData

func (*AuthflowV2SetupTOTPHandler) ServeHTTP

type AuthflowV2SignupHandler

type AuthflowV2SignupHandler struct {
	SignupLoginHandler InternalAuthflowV2SignupLoginHandler
	UIConfig           *config.UIConfig
}

func (*AuthflowV2SignupHandler) ServeHTTP

type AuthflowV2SignupServeOptions

type AuthflowV2SignupServeOptions struct {
	CanSwitchToLogin bool
	FlowType         authflow.FlowType
	UIVariant        AuthflowV2SignupUIVariant
}

type AuthflowV2SignupUIVariant

type AuthflowV2SignupUIVariant string
const (
	AuthflowV2SignupUIVariantSignup      AuthflowV2SignupUIVariant = "signup"
	AuthflowV2SignupUIVariantSignupLogin AuthflowV2SignupUIVariant = "signup_login"
)

type AuthflowV2SignupViewModel

type AuthflowV2SignupViewModel struct {
	CanSwitchToLogin bool
	UIVariant        AuthflowV2SignupUIVariant
}

type AuthflowV2TerminateOtherSessionsHandler

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

func (*AuthflowV2TerminateOtherSessionsHandler) GetData

func (*AuthflowV2TerminateOtherSessionsHandler) ServeHTTP

type AuthflowV2UsePasskeyHandler

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

func (*AuthflowV2UsePasskeyHandler) GetData

func (*AuthflowV2UsePasskeyHandler) ServeHTTP

type AuthflowV2UsePasskeyViewModel

type AuthflowV2UsePasskeyViewModel struct {
	PasskeyRequestOptionsJSON string
}

type AuthflowV2VerifyLoginLinkOTPHandler

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

func (*AuthflowV2VerifyLoginLinkOTPHandler) GetData

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

func (*AuthflowV2VerifyLoginLinkOTPHandler) ServeHTTP

type AuthflowV2ViewRecoveryCodeHandler

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

func (*AuthflowV2ViewRecoveryCodeHandler) GetData

func (*AuthflowV2ViewRecoveryCodeHandler) ServeHTTP

type AuthflowV2WechatHandler

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

func (*AuthflowV2WechatHandler) GetData

func (*AuthflowV2WechatHandler) ServeHTTP

type AuthflowViewRecoveryCodeViewModel

type AuthflowViewRecoveryCodeViewModel struct {
	RecoveryCodes []string
}

type AuthflowWechatViewModel

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

type ForgotPasswordLoginIDInputType

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

func (ForgotPasswordLoginIDInputType) IsValid

type InternalAuthflowV2SignupLoginHandler

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

func (*InternalAuthflowV2SignupLoginHandler) GetData

func (*InternalAuthflowV2SignupLoginHandler) ServeHTTP

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 SelectAccountAuthenticationInfoService

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

type SelectAccountIdentityService

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

type SelectAccountUIInfoResolver

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

type SelectAccountUserService

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

type SelectAccountViewModel

type SelectAccountViewModel struct {
	IdentityDisplayName string
	UserProfile         handlerwebapp.UserProfile
}

type VerifyLoginLinkOTPViewModel

type VerifyLoginLinkOTPViewModel struct {
	Code  string
	State LoginLinkOTPPageQueryState
}

func NewVerifyLoginLinkOTPViewModel

func NewVerifyLoginLinkOTPViewModel(r *http.Request) VerifyLoginLinkOTPViewModel

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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