Documentation ¶
Overview ¶
Package httpauth provides http utilities for auth.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTokenNotFound informs that token was not found. ErrTokenNotFound = errors.New("token not found") )
Functions ¶
func ExtractBearerToken ¶
ExtractBearerToken returns bearer token from Authorization header of the HTTP request.
func ExtractJSONWebKey ¶
func ExtractJSONWebKey(req *http.Request, keyer authkit.JSONWebKeyer) (jose.JSONWebKey, error)
ExtractJSONWebKey returns JWK for the bearer token in Authorization header of the HTTP request. Returns ErrTokenNotFound if request doesn't have a bearer token.
func ExtractJSONWebToken ¶
func ExtractJSONWebToken(req *http.Request) (*jwt.JSONWebToken, error)
ExtractJSONWebToken returns JWT parsed from bearer token in Authorization header of the HTTP request. Returns ErrTokenNotFound if request doesn't have a bearer token.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.