jwt

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	Email    string
	Password string
}

type Metadata

type Metadata struct {
	StaySignedIn bool
	Credentials  Credentials
}

func (Metadata) ToMapClaims

func (opts Metadata) ToMapClaims() jwt.MapClaims

type TokenGenerator

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

func NewTokenGenerator

func NewTokenGenerator(accessSecret string) *TokenGenerator

func (*TokenGenerator) ExtractAccessTokenMetadata

func (g *TokenGenerator) ExtractAccessTokenMetadata(token string) (*Metadata, error)

func (*TokenGenerator) Generate

func (g *TokenGenerator) Generate(metadata Metadata) (string, error)

Jump to

Keyboard shortcuts

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