Help us shape the future of Go! Take the 2026 Go Developer Survey

jwt

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildJWT

func BuildJWT(private *rsa.PrivateKey, claims interface{}) (*_jwt.Token, error)

func MustParseRSAKey

func MustParseRSAKey(s string) *rsa.PrivateKey

Types

type JWTAuthenticator

type JWTAuthenticator struct {
	jose.JSONWebKeySet
	// contains filtered or unexported fields
}

func NewJWTAuthenticator

func NewJWTAuthenticator(gitlab string) (*JWTAuthenticator, error)

func (*JWTAuthenticator) Handler

func (j *JWTAuthenticator) Handler(isBlocking bool) func(next http.Handler) http.Handler

Auth will ensure JWT token is valid

func (*JWTAuthenticator) ParseAndVerifySignature

func (j *JWTAuthenticator) ParseAndVerifySignature(jwtRaw string) (*_jwt.Token, error)

func (*JWTAuthenticator) VerifySignature

func (j *JWTAuthenticator) VerifySignature(t *_jwt.Token) error

Jump to

Keyboard shortcuts

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