jwter

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claim

type Claim struct {
	Key   string
	Value string
}

type JWTer

type JWTer struct {
	Issuer     string
	PrivateKey jwk.Key
	PublicKey  jwk.Key
}

func NewJWTer

func NewJWTer(issuer string, rawPrivateKey, rawPublicKey []byte) (*JWTer, error)

func (*JWTer) GenerateToken

func (j *JWTer) GenerateToken(subject string, duration time.Duration, claims []Claim) (string, []byte, error)

func (*JWTer) ParseRequest

func (j *JWTer) ParseRequest(r *http.Request) (jwt.Token, error)

Jump to

Keyboard shortcuts

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