{"repo":"aidantwoods/go-paseto","free":true,"listed":false,"github":"https://github.com/aidantwoods/go-paseto","clone":"git clone https://github.com/aidantwoods/go-paseto.git","description":"Platform-Agnostic Security Tokens implementation in Golang.","language":"Go","stars":493,"topics":["security","token","golang","paseto","go","go-paseto"],"license":"MIT","category":"security-tools","readme_excerpt":"Go Paseto A Go implementation of PASETO. Paseto is everything you love about JOSE (JWT, JWE, JWS) without any of the many design deficits that plague the JOSE standards. Contents What is Paseto? Key Differences between Paseto and JWT Installation Overview of the Go library Supported Paseto Versions What is Paseto? Paseto (Platform-Agnostic SEcurity TOkens) is a specification for secure stateless tokens. 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. Installation Overview of the Go library Okay, let's create a token: Now encrypt it: Or sign it (this allows recievers to verify it without sharing secrets): To handle a recieved token, let's use an example from Paseto's test vectors: The Paseto token is as follows And the public key, given in hex is: Importing a public key, and then verifying a token: Supported Claims Validators The following validators are supported: A token using claims all the claims which can be validated can be constructed as follows: The token in signed can then be validated using a public key as follows: I","default_branch":null,"files":null,"tree":[],"storefront":"/r/aidantwoods","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/aidantwoods/go-paseto/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}