proxyauth

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package proxyauth provides authentication support via the Proxy-Authorization header.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Modifier

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

Modifier is the proxy authentication modifier.

func NewModifier

func NewModifier() *Modifier

NewModifier returns a new proxy authentication modifier.

func (*Modifier) ModifyRequest

func (m *Modifier) ModifyRequest(req *http.Request) error

ModifyRequest sets the auth ID in the context from the request iff it has not already been set and runs reqmod.ModifyRequest. If the underlying modifier has indicated via auth error that no valid auth credentials have been found we set ctx.SkipRoundTrip.

func (*Modifier) ModifyResponse

func (m *Modifier) ModifyResponse(res *http.Response) error

ModifyResponse runs resmod.ModifyResponse and modifies the response to include the correct status code and headers if auth error is present.

If an error is returned from resmod.ModifyResponse it is returned.

func (*Modifier) SetRequestModifier

func (m *Modifier) SetRequestModifier(reqmod martian.RequestModifier)

SetRequestModifier sets the request modifier.

func (*Modifier) SetResponseModifier

func (m *Modifier) SetResponseModifier(resmod martian.ResponseModifier)

SetResponseModifier sets the response modifier.

Jump to

Keyboard shortcuts

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