digest

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2017 License: MIT Imports: 8 Imported by: 9 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package digest provides a limited implementation of HTTP Digest Authentication, as defined in RFC 2617.

Only the "auth" QOP directive is handled at this time, and while support for the SHA-256 algorithm is implemented here it does not actually work in either Chrome or Firefox.

For more info, see: https://tools.ietf.org/html/rfc2617 https://en.wikipedia.org/wiki/Digest_access_authentication

Index

Constants

View Source
const (
	MD5 digestAlgorithm = iota
	SHA256
)

Digest algorithms supported by this package

Variables

This section is empty.

Functions

func Challenge

func Challenge(realm string, algorithm digestAlgorithm) string

Challenge returns a WWW-Authenticate header value for the given realm and algorithm. If an invalid realm or an unsupported algorithm is given

func Check

func Check(req *http.Request, username, password string) bool

Check returns a bool indicating whether the request is correctly authenticated for the given username and password.

Types

This section is empty.

Jump to

Keyboard shortcuts

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