server

package
v4.38.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDefaultServer added in v4.36.0

func CreateDefaultServer(config *schema.Configuration, providers middlewares.Providers) (server *fasthttp.Server, listener net.Listener, paths []string, isTLS bool, err error)

CreateDefaultServer Create Authelia's internal web server with the given configuration and providers.

func CreateMetricsServer added in v4.36.0

func CreateMetricsServer(config *schema.Configuration, providers middlewares.Providers) (server *fasthttp.Server, listener net.Listener, paths []string, tls bool, err error)

CreateMetricsServer creates a metrics server.

func ETagRootURL added in v4.38.0

ETagRootURL dynamically matches the If-None-Match header and adds the ETag header.

func ServeTemplatedFile

ServeTemplatedFile serves a templated version of a specified file, this is utilised to pass information between the backend and frontend and generate a nonce to support a restrictive CSP while using material-ui.

func ServeTemplatedOpenAPI added in v4.38.0

func ServeTemplatedOpenAPI(t templates.Template, opts *TemplatedFileOptions) middlewares.RequestHandler

ServeTemplatedOpenAPI serves templated OpenAPI related files.

Types

type TemplatedFileCommonData added in v4.37.4

type TemplatedFileCommonData struct {
	Base                   string
	BaseURL                string
	Domain                 string
	CSPNonce               string
	LogoOverride           string
	DuoSelfEnrollment      string
	RememberMe             string
	ResetPassword          string
	ResetPasswordCustomURL string
	PrivacyPolicyURL       string
	PrivacyPolicyAccept    string
	Session                string
	Theme                  string
}

TemplatedFileCommonData is a struct which is used for many templated files.

type TemplatedFileOpenAPIData added in v4.38.0

type TemplatedFileOpenAPIData struct {
	Base          string
	BaseURL       string
	Domain        string
	CSPNonce      string
	Session       string
	PasswordReset bool
	WebAuthn      bool
	TOTP          bool
	Duo           bool
	OpenIDConnect bool

	EndpointsAuthz map[string]schema.ServerEndpointsAuthz
}

TemplatedFileOpenAPIData is a struct which is used for the OpenAPI spec file.

type TemplatedFileOptions added in v4.37.4

type TemplatedFileOptions struct {
	AssetPath              string
	DuoSelfEnrollment      string
	RememberMe             string
	ResetPassword          string
	ResetPasswordCustomURL string
	PrivacyPolicyURL       string
	PrivacyPolicyAccept    string
	Session                string
	Theme                  string

	EndpointsPasswordReset bool
	EndpointsWebAuthn      bool
	EndpointsTOTP          bool
	EndpointsDuo           bool
	EndpointsOpenIDConnect bool

	EndpointsAuthz map[string]schema.ServerEndpointsAuthz
}

TemplatedFileOptions is a struct which is used for many templated files.

func NewTemplatedFileOptions added in v4.37.4

func NewTemplatedFileOptions(config *schema.Configuration) (opts *TemplatedFileOptions)

NewTemplatedFileOptions returns a new *TemplatedFileOptions.

func (*TemplatedFileOptions) CommonData added in v4.37.4

func (options *TemplatedFileOptions) CommonData(base, baseURL, domain, nonce, logoOverride, rememberMe string) TemplatedFileCommonData

CommonData returns a TemplatedFileCommonData with the dynamic options.

func (*TemplatedFileOptions) OpenAPIData added in v4.38.0

func (options *TemplatedFileOptions) OpenAPIData(base, baseURL, domain, nonce string) TemplatedFileOpenAPIData

OpenAPIData returns a TemplatedFileOpenAPIData with the dynamic options.

Jump to

Keyboard shortcuts

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