core

package
v0.0.0-...-3ba6ade Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = ""
)

Functions

func AccessForbidden

func AccessForbidden(
	logger *zap.Logger,
	httpStatus int,
	page string,
	tags map[string]string,
	tmpl *template.Template,
) func(wrt http.ResponseWriter, req *http.Request) context.Context

AccessForbidden redirects the user to the forbidden page

func CustomSignInPage

func CustomSignInPage(
	logger *zap.Logger,
	page string,
	tags map[string]string,
	tmpl *template.Template,
) func(wrt http.ResponseWriter, authURL string)

renders CustomSignInPage

func EncryptToken

func EncryptToken(
	scope *models.RequestScope,
	rawToken string,
	encKey string,
	tokenType string,
	writer http.ResponseWriter,
) (string, error)

func GetVersion

func GetVersion() string

GetVersion returns the proxy version

func RedirectToAuthorization

func RedirectToAuthorization(
	logger *zap.Logger,
	noRedirects bool,
	cookManager *cookie.Manager,
	skipTokenVerification bool,
	noProxy bool,
	baseURI string,
	oAuthURI string,
	allowedQueryParams map[string]string,
	defaultAllowedQueryParams map[string]string,
) func(wrt http.ResponseWriter, req *http.Request) context.Context

RedirectToAuthorization redirects the user to authorization handler

func RedirectToURL

func RedirectToURL(
	logger *zap.Logger,
	url string,
	wrt http.ResponseWriter,
	req *http.Request,
	statusCode int,
) context.Context

RedirectToURL redirects the user and aborts the context

Types

type GoogleProvider

type GoogleProvider string

type KeycloakProvider

type KeycloakProvider string

type OauthProxies

type OauthProxies interface {
	CreateReverseProxy() error
	Run() (context.Context, error)
	Shutdown() error
}

type ReverseProxy

type ReverseProxy interface {
	ServeHTTP(rw http.ResponseWriter, req *http.Request)
}

ReverseProxy is a wrapper

Jump to

Keyboard shortcuts

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