auth

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoBearerToken = errors.New("token: no bearer token in request header")

ErrNoBearerToken is returned by BearerToken when no authorization header is set or the authorization header is not a bearer token.

Functions

func BearerToken

func BearerToken(r *http.Request) ([]byte, error)

BearerToken returns the bearer token from the request when available. It returns an ErrNoBearerToken error when missing or a hex error when the token is not a valid hex.

Types

This section is empty.

Jump to

Keyboard shortcuts

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