Documentation
¶
Overview ¶
Package middleware provides HTTP middleware for authorization.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthorization ¶
GetAuthorization retrieves the bearer token from the context.
func NewAuthorizationHandler ¶
NewAuthorizationHandler wraps an http.Handler with authorization extraction.
func WithAuthorization ¶
WithAuthorization stores the bearer token in the context.
Types ¶
type AuthorizationHandler ¶
type AuthorizationHandler struct {
// contains filtered or unexported fields
}
AuthorizationHandler extracts the Authorization header and stores it in the context.
func (*AuthorizationHandler) ServeHTTP ¶
func (h *AuthorizationHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.