package
0.0.0-20220901164547-f47a0e9a9163
Repository: https://github.com/bmogetta/gobank_go-course.git
Documentation: pkg.go.dev
# README
A Platform-Agnostic SEcurity TOken PASETO
Paseto is a cryptographically secure, compact, and URL-safe representation of claims intended for space-constrained environments such as HTTP Cookies, HTTP Authorization headers, and URI query parameters.
Key Differences between Paseto and JWT Unlike JSON Web Tokens (JWT), which gives developers more than enough rope with which to hang themselves, Paseto only allows secure operations. JWT gives you "algorithm agility", Paseto gives you "versioned protocols". It's incredibly unlikely that you'll be able to use Paseto in an insecure way.
Caution: Neither JWT nor Paseto were designed for stateless session management. Paseto is suitable for tamper-proof cookies, but cannot prevent replay attacks by itself.
go get -u github.com/o1egl/paseto
# Functions
NewPasetoMaker creates a new PasetoMaker instance.
NewPayload creates a new token payload with a specific username and duration.
# Variables
Different types of error returned by the VerifyToken function.
Different types of error returned by the VerifyToken function.
# Structs
PasetoMaker is a PASETO token maker.
Payload contains the payload data of the token.
# Interfaces
Maker is an interface for managing tokens.