web

package
v0.0.0-...-a9e6128 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheExpiration = time.Minute * 2
	CleanupInterval = time.Minute * 5
)
View Source
const (
	MaxAge = 120
)

Variables

This section is empty.

Functions

func EnrichContext

func EnrichContext(next http.Handler) http.Handler

func GetSession

func GetSession(r *http.Request) (*sessions.Session, error)

func GetSessionIdentity

func GetSessionIdentity(r *http.Request) (identity.Identity, error)

func InitStore

func InitStore(sessionKey []byte, encryptionKey []byte, storeType string, maxLength int)

func NoAuthz

func NoAuthz(r *http.Request, rm *mux.RouteMatch) bool

func SaveSessionIdentity

func SaveSessionIdentity(r *http.Request, w http.ResponseWriter, id identity.Identity) error

func TokenInfo

func TokenInfo(w http.ResponseWriter, r *http.Request)

func TransposeSPNEGOContext

func TransposeSPNEGOContext(next http.Handler) http.Handler

Types

type AuthMux

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

func NewAuthMux

func NewAuthMux() *AuthMux

func (*AuthMux) Register

func (a *AuthMux) Register(s string)

func (*AuthMux) SetAuthenticate

func (a *AuthMux) SetAuthenticate(w http.ResponseWriter, r *http.Request)

type BasicAuthHandler

type BasicAuthHandler struct {
	SocketAddress string
	Timeout       int
}

func (*BasicAuthHandler) BasicAuth

func (h *BasicAuthHandler) BasicAuth(next http.HandlerFunc) http.HandlerFunc

type Config

type Config struct {
	PAATokenGenerator  TokenGeneratorFunc
	UserTokenGenerator UserTokenGeneratorFunc
	QueryInfo          QueryInfoFunc
	QueryTokenIssuer   string
	EnableUserToken    bool
	Hosts              []string
	HostSelection      string
	GatewayAddress     *url.URL
	RdpOpts            RdpOpts
	TemplateFile       string
}

func (*Config) NewHandler

func (c *Config) NewHandler() *Handler

type Handler

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

func (*Handler) HandleDownload

func (h *Handler) HandleDownload(w http.ResponseWriter, r *http.Request)

type OIDC

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

func (*OIDC) Authenticated

func (h *OIDC) Authenticated(next http.Handler) http.Handler

func (*OIDC) HandleCallback

func (h *OIDC) HandleCallback(w http.ResponseWriter, r *http.Request)

type OIDCConfig

type OIDCConfig struct {
	OAuth2Config      *oauth2.Config
	OIDCTokenVerifier *oidc.IDTokenVerifier
}

func (*OIDCConfig) New

func (c *OIDCConfig) New() *OIDC

type QueryInfoFunc

type QueryInfoFunc func(context.Context, string, string) (string, error)

type RdpOpts

type RdpOpts struct {
	UsernameTemplate string
	SplitUserDomain  bool
}

type TokenGeneratorFunc

type TokenGeneratorFunc func(context.Context, string, string) (string, error)

type UserTokenGeneratorFunc

type UserTokenGeneratorFunc func(context.Context, string) (string, error)

Jump to

Keyboard shortcuts

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