token

package
v0.0.0-...-f750f1c Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	Generate(userID, scope string, exp time.Time, claims map[string]interface{}) (token string, err error)
}

func NewGenerator

func NewGenerator(privateKey *rsa.PrivateKey) Generator

type Parser

type Parser interface {
	Parse(rawToken string, scope string) (token *jwt.Token, claims jwt.MapClaims, err error)
	ParseUnverified(rawToken string) (token *jwt.Token, claims jwt.MapClaims, err error)
}

func NewParser

func NewParser(getPublicKey func() *rsa.PublicKey) Parser

Jump to

Keyboard shortcuts

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