handler

package
v0.0.0-...-c92217e Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizationHandlerFromConfig

func AuthorizationHandlerFromConfig(cfg *Config) (http.Handler, error)

func CallbackHandlerFromConfig

func CallbackHandlerFromConfig(cfg *Config) (http.Handler, error)

func HeaderRenameHandler

func HeaderRenameHandler(oldPrefix, newPrefix string) http.Handler

Types

type Config

type Config struct {
	OAuth   OAuthConfig   `yaml:"oauth"`
	Session SessionConfig `yaml:"session"`
}

func ParseConfig

func ParseConfig(data []byte) (*Config, error)

type InvalidKeyLengthError

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

func (*InvalidKeyLengthError) Error

func (e *InvalidKeyLengthError) Error() string

type OAuthConfig

type OAuthConfig struct {
	ClientID          string   `yaml:"client_id"`
	ClientSecret      string   `yaml:"client_secret"`
	SkipSSLValidation bool     `yaml:"skip_ssl_validation"`
	AuthorizationURL  string   `yaml:"authorization_url"`
	TokenURL          string   `yaml:"token_url"`
	RedirectURL       string   `yaml:"redirect_url"`
	RequiredScopes    []string `yaml:"required_scopes"`
	OptionalScopes    []string `yaml:"optional_scopes"`
}

type SessionConfig

type SessionConfig struct {
	AuthenticationKey string `yaml:"authentication_key"`
	EncryptionKey     string `yaml:"encryption_key"`
}

Jump to

Keyboard shortcuts

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