token

package
v0.0.0-...-344b8df Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 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 {
	Audience string      `json:"audience,omitempty"`
	User     *model.User `json:"user,omitempty"`
}

func NewClaim

func NewClaim(dataUser *model.User) *Claim

type Token

type Token interface {
	Generate(cl *Claim) (string, error)
	Refresh(tokenString string) (string, error)
	Extract(tokenString string) (bool, *Claim)
}

Token module abstraction

func New

func New(privateKey *rsa.PrivateKey, publicKey *rsa.PublicKey, age time.Duration) Token

Jump to

Keyboard shortcuts

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