jwtutil

package
v1.0.0-beta.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

type Signer struct {
	// contains filtered or unexported fields
}

func NewSigner

func NewSigner(privateKey *rsa.PrivateKey) *Signer

func (*Signer) GenerateToken

func (s *Signer) GenerateToken(issuer string, scope []string, claims map[string]interface{}, expiry time.Duration) (string, error)

type Verifier

type Verifier struct {
	PublicKey *rsa.PublicKey
}

func NewVerifier

func NewVerifier(publicKey *rsa.PublicKey) *Verifier

func (*Verifier) Verify

func (v *Verifier) Verify(tokenString string) (jwt.MapClaims, error)

Jump to

Keyboard shortcuts

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