tokens

package
v0.28.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BearerTokenFromCookie

func BearerTokenFromCookie(h *fasthttp.RequestHeader) []byte

BearerTokenFromCookie extracts a bearer token from cookies.

func BearerTokenFromHeader

func BearerTokenFromHeader(h *fasthttp.RequestHeader) []byte

BearerTokenFromHeader extracts a bearer token from Authorization request header.

func LoadBearerToken

func LoadBearerToken(ctx context.Context) (*bearer.Token, error)

LoadBearerToken returns a bearer token stored in the context given (if it's present there).

func StoreBearerTokenAppCtx added in v0.28.0

func StoreBearerTokenAppCtx(ctx context.Context, req *fasthttp.RequestCtx) (context.Context, error)

StoreBearerTokenAppCtx extracts a bearer token from the header or cookie and stores it in the application context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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