jwt

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestWithSignedObject

func RequestWithSignedObject(req *http.Request, sigStamp []byte, obj Claims) error

func RequireJwtToken

func RequireJwtToken(
	secret string,
	claimsFactory func() Claims,
) func(next http.Handler) http.Handler

*

	Http middleware. If the jwt is valid it will be found in:

 		r.Context().Value(contextKey("jwt-claims"))

Types

type Claims

type Claims interface {
	Valid() error
}

func GetClaims

func GetClaims(r *http.Request) Claims

Jump to

Keyboard shortcuts

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