handler

package
v1.87.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LowerCaseRegex = `[a-z]`
	UpperCaseRegex = `[A-Z]`
	NumberRegex    = `[0-9]`
	SymbolRegex    = `[^A-Za-z0-9]`
)
View Source
const (
	EndpointRoot                     = "/"
	EndpointHealthz                  = "/healthz"
	EndpointReadiness                = "/ready"
	EndpointLogin                    = "/login"
	EndpointExternalLogin            = "/login/externalidp"
	EndpointExternalLoginCallback    = "/login/externalidp/callback"
	EndpointJWTAuthorize             = "/login/jwt/authorize"
	EndpointJWTCallback              = "/login/jwt/callback"
	EndpointPasswordlessLogin        = "/login/passwordless"
	EndpointPasswordlessRegistration = "/login/passwordless/init"
	EndpointPasswordlessPrompt       = "/login/passwordless/prompt"
	EndpointLoginName                = "/loginname"
	EndpointUserSelection            = "/userselection"
	EndpointChangeUsername           = "/username/change"
	EndpointPassword                 = "/password"
	EndpointInitPassword             = "/password/init"
	EndpointChangePassword           = "/password/change"
	EndpointPasswordReset            = "/password/reset"
	EndpointInitUser                 = "/user/init"
	EndpointMFAVerify                = "/mfa/verify"
	EndpointMFAPrompt                = "/mfa/prompt"
	EndpointMFAInitVerify            = "/mfa/init/verify"
	EndpointMFAInitU2FVerify         = "/mfa/init/u2f/verify"
	EndpointU2FVerification          = "/mfa/u2f/verify"
	EndpointMailVerification         = "/mail/verification"
	EndpointMailVerified             = "/mail/verified"
	EndpointRegisterOption           = "/register/option"
	EndpointRegister                 = "/register"
	EndpointExternalRegister         = "/register/externalidp"
	EndpointExternalRegisterCallback = "/register/externalidp/callback"
	EndpointRegisterOrg              = "/register/org"
	EndpointLogoutDone               = "/logout/done"
	EndpointLoginSuccess             = "/login/success"
	EndpointExternalNotFoundOption   = "/externaluser/option"

	EndpointResources        = "/resources"
	EndpointDynamicResources = "/resources/dynamic"
)

Variables

This section is empty.

Functions

func CreateRouter

func CreateRouter(login *Login, staticDir http.FileSystem, interceptors ...mux.MiddlewareFunc) *mux.Router

Types

type CSRF

type CSRF struct {
	CookieName  string
	Key         *crypto.KeyConfig
	Development bool
}

type Config

type Config struct {
	BaseURL               string
	OidcAuthCallbackURL   string
	ZitadelURL            string
	LanguageCookieName    string
	DefaultLanguage       language.Tag
	CSRF                  CSRF
	UserAgentCookieConfig *middleware.UserAgentCookieConfig
	Cache                 middleware.CacheConfig
	StaticCache           cache_config.CacheConfig
}

type LanguageData

type LanguageData struct {
	Lang string
}

type Login

type Login struct {
	IDPConfigAesCrypto crypto.EncryptionAlgorithm
	// contains filtered or unexported fields
}

func CreateLogin

func CreateLogin(config Config, command *command.Commands, query *query.Queries, authRepo *eventsourcing.EsRepository, staticStorage static.Storage, systemDefaults systemdefaults.SystemDefaults, localDevMode bool) (*Login, string)

func (*Login) Handler

func (l *Login) Handler() http.Handler

func (*Login) Listen

func (l *Login) Listen(ctx context.Context)

type Renderer

type Renderer struct {
	*renderer.Renderer
	// contains filtered or unexported fields
}

func CreateRenderer

func CreateRenderer(pathPrefix string, staticDir http.FileSystem, staticStorage static.Storage, cookieName string, defaultLanguage language.Tag) *Renderer

Jump to

Keyboard shortcuts

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