middlewareshttp

package
v0.94.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthFromAuthorizationHeader

func AuthFromAuthorizationHeader(keyFunc jwt.Keyfunc, claimsFunc ClaimsFunc, signingMethod jwt.SigningMethod, next nhttp.Handler) nhttp.Handler

AuthFromAuthorizationHeader is a middleware that extracts the token from the authorization header and verifies it

func AuthFromQueryParam

func AuthFromQueryParam(keyFunc jwt.Keyfunc, claimsFunc ClaimsFunc, signingMethod jwt.SigningMethod, next nhttp.Handler) nhttp.Handler

AuthFromQueryParam is a middleware that extracts the token from the query parameter and verifies it

Types

type ClaimsFunc

type ClaimsFunc func() jwt.Claims

ClaimsFunc is a function that returns a jwt.Claims with the custom claims and correct type

Jump to

Keyboard shortcuts

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