paseto

package
v0.0.0-...-4c0fd1a Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewPasetoMaker)

ProviderSet is paseto providers.

Functions

This section is empty.

Types

type Maker

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

func (*Maker) NewAccessToken

func (m *Maker) NewAccessToken(userId string) (string, error)

func (*Maker) NewRefreshToken

func (m *Maker) NewRefreshToken(userId string) (string, error)

func (*Maker) ParseAccessToken

func (m *Maker) ParseAccessToken(token string) (string, error)

func (*Maker) ParseRefreshToken

func (m *Maker) ParseRefreshToken(token string) (string, error)

type TokenMaker

type TokenMaker interface {
	NewAccessToken(userId string) (string, error)
	NewRefreshToken(userId string) (string, error)
	ParseAccessToken(token string) (string, error)
	ParseRefreshToken(token string) (string, error)
}

func NewPasetoMaker

func NewPasetoMaker(c *conf.TokenMaker) (TokenMaker, error)

Jump to

Keyboard shortcuts

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