login

package
v0.0.0-...-860e413 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HandlerPrefix        = "/ui/login"
	DefaultLoggedOutPath = HandlerPrefix + EndpointLogoutDone
)
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"
)
View Source
const (
	QueryAuthRequestID = "authRequestID"
)

Variables

View Source
var (
	IgnoreInstanceEndpoints = []string{
		EndpointResources + "/fonts",
		EndpointResources + "/images",
		EndpointResources + "/scripts",
		EndpointResources + "/themes",
	}
)

Functions

func CreateRouter

func CreateRouter(login *Login, staticDir http.FileSystem, interceptors ...mux.MiddlewareFunc) *mux.Router
func InitPasswordLink(origin, userID, code, orgID string) string
func InitUserLink(origin, userID, code, orgID string, passwordSet bool) string
func LoginLink(origin, orgID string) string
func MailVerificationLink(origin, userID, code, orgID string) string

Types

type Config

type Config struct {
	LanguageCookieName string
	CSRFCookieName     string
	Cache              middleware.CacheConfig
	AssetCache         middleware.CacheConfig
}

type LanguageData

type LanguageData struct {
	Lang string
}

type Login

type Login struct {
	// contains filtered or unexported fields
}

func CreateLogin

func CreateLogin(config Config,
	command *command.Commands,
	query *query.Queries,
	authRepo *eventsourcing.EsRepository,
	staticStorage static.Storage,
	consolePath string,
	oidcAuthCallbackURL func(context.Context, string) string,
	samlAuthCallbackURL func(context.Context, string) string,
	externalSecure bool,
	userAgentCookie,
	issuerInterceptor,
	oidcInstanceHandler,
	samlInstanceHandler mux.MiddlewareFunc,
	assetCache mux.MiddlewareFunc,
	userCodeAlg crypto.EncryptionAlgorithm,
	idpConfigAlg crypto.EncryptionAlgorithm,
	csrfCookieKey []byte,
) (*Login, error)

func (*Login) Handler

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

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) *Renderer

Directories

Path Synopsis
static

Jump to

Keyboard shortcuts

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