handlers

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: BSD-3-Clause Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthFlowMachineRegistration = "r"
	AuthFlowClient              = "c"
	AuthFlowSSHCheckFlow        = "s"
)
View Source
const (
	NoiseCapabilityVersion = 28
)

Variables

This section is empty.

Functions

func HttpsRedirect

func HttpsRedirect(c config.Tls) echo.MiddlewareFunc

func IndexHandler

func IndexHandler(code int) echo.HandlerFunc

func KeyHandler

func KeyHandler(keys *config.ServerKeys) echo.HandlerFunc

func Version

func Version(c echo.Context) error

Types

type AuthFlow added in v0.11.0

type AuthFlow string

type AuthInput added in v0.11.0

type AuthInput struct {
	Key     string   `param:"key"`
	Flow    AuthFlow `param:"flow"`
	AuthKey string   `query:"ak" form:"ak"`
	Oidc    bool     `query:"oidc" form:"oidc"`
}

type AuthenticationHandlers

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

func NewAuthenticationHandlers

func NewAuthenticationHandlers(
	config *config.Config,
	authProvider auth.Provider,
	systemIAMPolicy *domain.IAMPolicy,
	repository domain.Repository) *AuthenticationHandlers

func (*AuthenticationHandlers) Callback

func (h *AuthenticationHandlers) Callback(c echo.Context) error

func (*AuthenticationHandlers) EndAuth added in v0.11.0

func (h *AuthenticationHandlers) EndAuth(c echo.Context) error

func (*AuthenticationHandlers) Error

func (h *AuthenticationHandlers) Error(c echo.Context) error

func (*AuthenticationHandlers) ProcessAuth

func (h *AuthenticationHandlers) ProcessAuth(c echo.Context) error

func (*AuthenticationHandlers) StartAuth

func (h *AuthenticationHandlers) StartAuth(c echo.Context) error

func (*AuthenticationHandlers) Success

func (h *AuthenticationHandlers) Success(c echo.Context) error

type CreatePeerHandler

type CreatePeerHandler func(p key.MachinePublic) http.Handler

type DERPHandlers added in v0.15.0

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

func NewDERPHandler added in v0.15.0

func NewDERPHandler() *DERPHandlers

func (*DERPHandlers) DebugCheck added in v0.15.0

func (h *DERPHandlers) DebugCheck(c echo.Context) error

func (*DERPHandlers) DebugTraffic added in v0.15.0

func (h *DERPHandlers) DebugTraffic(c echo.Context) error

func (*DERPHandlers) Handler added in v0.15.0

func (h *DERPHandlers) Handler(c echo.Context) error

func (*DERPHandlers) LatencyCheck added in v0.15.0

func (h *DERPHandlers) LatencyCheck(c echo.Context) error

type DNSHandlers added in v0.3.0

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

func NewDNSHandlers added in v0.3.0

func NewDNSHandlers(_ key.MachinePublic, provider dns.Provider) *DNSHandlers

func (*DNSHandlers) SetDNS added in v0.3.0

func (h *DNSHandlers) SetDNS(c echo.Context) error

type EndAuthForm added in v0.11.0

type EndAuthForm struct {
	AccountID     uint64 `form:"aid"`
	TailnetID     uint64 `form:"tid"`
	AsSystemAdmin bool   `form:"sad"`
	AuthKey       string `form:"ak"`
	State         string `form:"state"`
}

type IDTokenHandlers added in v0.3.0

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

func NewIDTokenHandlers added in v0.3.0

func NewIDTokenHandlers(machineKey key.MachinePublic, config *config.Config, repository domain.Repository) *IDTokenHandlers

func (*IDTokenHandlers) FetchToken added in v0.3.0

func (h *IDTokenHandlers) FetchToken(c echo.Context) error

type JsonBinder added in v0.11.0

type JsonBinder struct {
	echo.DefaultBinder
}

func (JsonBinder) Bind added in v0.11.0

func (b JsonBinder) Bind(i interface{}, c echo.Context) error

type NoiseHandlers

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

func NewNoiseHandlers

func NewNoiseHandlers(controlKey key.MachinePrivate, createPeerHandler CreatePeerHandler) *NoiseHandlers

func (*NoiseHandlers) Upgrade

func (h *NoiseHandlers) Upgrade(c echo.Context) error

type OIDCConfigHandlers added in v0.11.0

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

func NewOIDCConfigHandlers added in v0.11.0

func NewOIDCConfigHandlers(config *config.Config, repository domain.Repository) *OIDCConfigHandlers

func (*OIDCConfigHandlers) Jwks added in v0.11.0

func (h *OIDCConfigHandlers) Jwks(c echo.Context) error

func (*OIDCConfigHandlers) OpenIDConfig added in v0.11.0

func (h *OIDCConfigHandlers) OpenIDConfig(c echo.Context) error

type PollNetMapHandler

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

func NewPollNetMapHandler

func NewPollNetMapHandler(
	machineKey key.MachinePublic,
	sessionManager core.PollMapSessionManager,
	repository domain.Repository) *PollNetMapHandler

func (*PollNetMapHandler) PollNetMap

func (h *PollNetMapHandler) PollNetMap(c echo.Context) error

type QueryFeatureHandlers added in v0.10.0

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

func NewQueryFeatureHandlers added in v0.10.0

func NewQueryFeatureHandlers(machineKey key.MachinePublic, dnsProvider dns.Provider, repository domain.Repository) *QueryFeatureHandlers

func (*QueryFeatureHandlers) QueryFeature added in v0.10.0

func (h *QueryFeatureHandlers) QueryFeature(c echo.Context) error

type RegistrationHandlers

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

func NewRegistrationHandlers

func NewRegistrationHandlers(
	machineKey key.MachinePublic,
	config *config.Config,
	sessionManager core.PollMapSessionManager,
	repository domain.Repository) *RegistrationHandlers

func (*RegistrationHandlers) Register

func (h *RegistrationHandlers) Register(c echo.Context) error

type SSHActionHandlers added in v0.4.0

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

func NewSSHActionHandlers added in v0.4.0

func NewSSHActionHandlers(machineKey key.MachinePublic, config *config.Config, repository domain.Repository) *SSHActionHandlers

func (*SSHActionHandlers) CheckAuth added in v0.4.0

func (h *SSHActionHandlers) CheckAuth(c echo.Context) error

func (*SSHActionHandlers) StartAuth added in v0.4.0

func (h *SSHActionHandlers) StartAuth(c echo.Context) error

type Selector

type Selector func(ctx context.Context, ip string) (int64, error)

Jump to

Keyboard shortcuts

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