handlers

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2022 Sorint.lab

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthChecker added in v0.8.0

func NewAuthChecker(log zerolog.Logger, configstoreClient *csclient.Client, opts ...AuthCheckerOption) func(http.Handler) http.Handler

func NewMaxBytesHandler

func NewMaxBytesHandler(h http.Handler, n int64) *maxBytesHandler

func NewSetCSRFHeader added in v0.8.0

func NewSetCSRFHeader(log zerolog.Logger) func(http.Handler) http.Handler

func NewSkipCSRFOnTokenAuth added in v0.8.0

func NewSkipCSRFOnTokenAuth(log zerolog.Logger) func(http.Handler) http.Handler

func NewWebBundleHandlerFunc

func NewWebBundleHandlerFunc(gatewayURL string) func(w http.ResponseWriter, r *http.Request)

Types

type AuthChecker added in v0.8.0

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

func (*AuthChecker) ServeHTTP added in v0.8.0

func (h *AuthChecker) ServeHTTP(w http.ResponseWriter, r *http.Request)

type AuthCheckerOption added in v0.8.0

type AuthCheckerOption func(*AuthChecker)

func WithCookieChecker added in v0.8.0

func WithCookieChecker(sc *scommon.CookieSigningData, unsecureCookies bool) AuthCheckerOption

func WithRequired added in v0.8.0

func WithRequired(required bool) AuthCheckerOption

func WithTokenChecker added in v0.8.0

func WithTokenChecker(adminToken string) AuthCheckerOption

type SetCSRFHeader added in v0.8.0

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

func (*SetCSRFHeader) ServeHTTP added in v0.8.0

func (h *SetCSRFHeader) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SkipCSRFOnTokenAuth added in v0.8.0

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

func (*SkipCSRFOnTokenAuth) ServeHTTP added in v0.8.0

func (h *SkipCSRFOnTokenAuth) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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