auth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: BSD-3-Clause Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	Type() string
	User() string
	Password() string
	Authorize(*http.Request)
}

Authenticator stub

var Anonymous Authenticator = &noAuth{}

func Basic

func Basic(user string, pw string) Authenticator

func Deferred

func Deferred(user string, pw string) Authenticator

func SAML

func SAML(user, pw, siteURL string, hc httpclient.HttpClient) Authenticator

type DigestAuth

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

DigestAuth structure holds our credentials.

func Digest

func Digest(user string, pw string) *DigestAuth

Digest implements HTTP digest authentication. see https://tools.ietf.org/html/rfc7616

func (*DigestAuth) Authorize

func (d *DigestAuth) Authorize(req *http.Request)

Authorize the current request.

func (*DigestAuth) DigestParts

func (d *DigestAuth) DigestParts(wwwAuthenticateHeader string) Authenticator

func (*DigestAuth) Password

func (d *DigestAuth) Password() string

Password holds the DigestAuth password.

func (*DigestAuth) Type

func (d *DigestAuth) Type() string

Type identifies the Digest authenticator.

func (*DigestAuth) User

func (d *DigestAuth) User() string

User holds the DigestAuth username.

Jump to

Keyboard shortcuts

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