accesstoken

package
v0.0.0-...-07f2725 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: MIT Imports: 5 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(indent string, expire time.Duration) (token string, err error)
}

this interface provides the scheme to generate JWT access token

type JWTKeyPair

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

This implements the RSA keypair needed to sign JWT

func NewJWTManager

func NewJWTManager(privateKeyFile, publicKeyFile string) (m *JWTKeyPair, err error)

this functions generates a new Keypair for JWT signing

func (*JWTKeyPair) Generate

func (m *JWTKeyPair) Generate(ident string, expire time.Duration) (token string, err error)

func (*JWTKeyPair) Validate

func (m *JWTKeyPair) Validate(token string) (ident string, err error)

type Validator

type Validator interface {
	Validate(token string) (indent string, err error)
}

this interface provides the scheme to validate JWT access token

Jump to

Keyboard shortcuts

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