paseto

package
v0.0.0-...-33a54ff Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *config.Token) (port.TokenService, error)

New creates a new paseto instance

Types

type PasetoToken

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

*

  • PasetoToken implements port.TokenService interface
  • and provides an access to the paseto library

func (*PasetoToken) CreateToken

func (pt *PasetoToken) CreateToken(user *domain.User) (string, error)

CreateToken creates a new paseto token

func (*PasetoToken) VerifyToken

func (pt *PasetoToken) VerifyToken(token string) (*domain.TokenPayload, error)

VerifyToken verifies the paseto token

Jump to

Keyboard shortcuts

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