auth

package
v0.0.0-...-8b4df74 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverKrb5Config

func DiscoverKrb5Config(name string) (io.ReadCloser, error)

Types

type Auth

type Auth struct {
	Logger logging.Logger
	// contains filtered or unexported fields
}

func NewAuth

func NewAuth(cs CredentialStore, spnego *SPNEGO) *Auth

func (Auth) Authorize

func (a Auth) Authorize(resp *http.Response, pc ProxyConnection) error

type BasicAuth

type BasicAuth struct {
	CredentialStore
}

func (BasicAuth) Authorize

func (a BasicAuth) Authorize(resp *http.Response, pc ProxyConnection) error

type CredentialStore

type CredentialStore interface {
	Credentials(realm string) (Credentials, error)
}

type Credentials

type Credentials struct {
	Username string
	Password string
	Realm    string
}

func (Credentials) Credentials

func (c Credentials) Credentials(realm string) (Credentials, error)
type Header string

func GetHeader

func GetHeader(resp *http.Response) Header

func (Header) GetData

func (h Header) GetData() ([]byte, error)

func (Header) GetOptions

func (h Header) GetOptions() map[string]string

func (Header) IsBasic

func (h Header) IsBasic() bool

func (Header) IsNTLM

func (h Header) IsNTLM() bool

func (Header) IsNegotiate

func (h Header) IsNegotiate() bool

type NTLM

type NTLM struct {
	Credentials
}

func (NTLM) Authorize

func (n NTLM) Authorize(resp *http.Response, pc ProxyConnection) error

Authorize a proxy connection using NTLM

type ProxyConnection

type ProxyConnection interface {
	Proxy() *url.URL
	Connect(auth string) (*http.Response, error)
}

type SPNEGO

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

SPNEGO Authorizer

func NewSPNEGO

func NewSPNEGO(c Credentials, krbconf string) (*SPNEGO, error)

NewSPNEGO creates a new SPNEGO authenticator

func (*SPNEGO) Authorize

func (c *SPNEGO) Authorize(resp *http.Response, pc ProxyConnection) error

func (*SPNEGO) Header

func (c *SPNEGO) Header(proxy *url.URL) (string, error)

Header gets the Negotiate header authorizing the request

Jump to

Keyboard shortcuts

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