Documentation ¶
Overview ¶
Package auth contains utilities to perform authentication.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNonce ¶
GenerateNonce generates a nonce that can be used in Validate().
func GenerateWWWAuthenticate ¶
func GenerateWWWAuthenticate(methods []ValidateMethod, realm string, nonce string) base.HeaderValue
GenerateWWWAuthenticate generates a WWW-Authenticate header.
Types ¶
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender allows to send credentials.
func NewSender ¶
NewSender allocates a Sender. It requires a WWW-Authenticate header (provided by the server) and a set of credentials.
func (*Sender) AddAuthorization ¶
AddAuthorization adds the Authorization header to a Request.
type ValidateMethod ¶ added in v4.10.0
type ValidateMethod int
ValidateMethod is a validation method.
const ( ValidateMethodBasic ValidateMethod = iota ValidateMethodDigestMD5 ValidateMethodSHA256 )
validation methods.
Click to show internal directories.
Click to hide internal directories.