auth

package
v0.36.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EmptyAuthenticationClientConfig = AuthenticationClientConfig{}
	EmptyAuthenticationServerConfig = AuthenticationServerConfig{}
)

Functions

func AuthHandlerFunc

func AuthHandlerFunc(cfg *AuthenticationServerConfig, origHandler http.HandlerFunc) http.HandlerFunc

func NullHandler

func NullHandler(next http.HandlerFunc) http.HandlerFunc

Types

type AuthenticationClientConfig

type AuthenticationClientConfig struct {
	BasicAuthConfig  basic.BasicAuthClientConfig   `mapstructure:"basic"`
	GitHubAuthConfig github.GitHubAuthClientConfig `mapstructure:"github"`
	HMACAuthConfig   hmac.HMACAuthClientConfig     `mapstructure:"hmac"`
}

need something to deserialize and append details to http.Request

func (AuthenticationClientConfig) IsEmpty

func (c AuthenticationClientConfig) IsEmpty() bool

type AuthenticationServerConfig

type AuthenticationServerConfig struct {
	BasicAuthConfig  basic.BasicAuthServerConfig   `mapstructure:"basic"`
	GitHubAuthConfig github.GitHubAuthServerConfig `mapstructure:"github"`
	HMACAuthConfig   hmac.HMACAuthServerConfig     `mapstructure:"hmac"`
}

func (AuthenticationServerConfig) IsEmpty

func (c AuthenticationServerConfig) IsEmpty() bool

type ClientAuth

type ClientAuth interface {
	AddAuth(*http.Request) error
}

func AuthClient

func AuthClient(authConfig AuthenticationClientConfig) ClientAuth

TODO: Choose a better name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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