Documentation
¶
Overview ¶
Package credential extracts a credential from an HTTP request for the authenticators of auth and auth/jwtauth: from a header after an optional scheme prefix, a query parameter or a cookie.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromCookie ¶
FromCookie returns the trimmed value of the cookie named cookie, when it is not empty; an empty name finds nothing.
func FromHeader ¶
FromHeader returns the first value of header that carries a credential after prefix: the prefix matches case-insensitively and must be followed by a space or tab, every value of a repeated header is tried, and surrounding whitespace is trimmed. An empty prefix takes the whole trimmed value; an empty header name finds nothing.
Types ¶
This section is empty.