redirect

package
v7.0.0-...-1c7ecba Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppDirector

type AppDirector interface {
	GetRedirect(req *http.Request) (string, error)
}

AppDirector is responsible for determining where OAuth2 Proxy should redirect a users request to after the user has authenticated with the identity provider.

func NewAppDirector

func NewAppDirector(opts AppDirectorOpts) AppDirector

NewAppDirector constructs a new AppDirector for getting the application redirect URL.

type AppDirectorOpts

type AppDirectorOpts struct {
	ProxyPrefix string
	Validator   Validator
}

AppDirectorOpts are the requirements for constructing a new AppDirector.

type Validator

type Validator interface {
	IsValidRedirect(redirect string) bool
}

Validator is an interface to allow validation of application redirect URLs. As these values are determined from the request, they must go through thorough checks to ensure the safety of the end user.

func NewValidator

func NewValidator(allowedDomains []string) Validator

NewValidator constructs a new redirect validator.

Jump to

Keyboard shortcuts

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