Categorygithub.com/ginger-go/jwt
modulepackage
1.0.0
Repository: https://github.com/ginger-go/jwt.git
Documentation: pkg.go.dev

# README

jwt

The JWT package provides a simple and efficient way to encode, sign, and verify JSON Web Tokens in Go applications. JSON Web Tokens are a popular standard for representing claims securely between two parties, such as a client and a server, and are widely used in modern web applications and APIs.

Installation

go get -u github.com/ginger-go/jwt

Documentation

Please refer to https://ginger-go.gitbook.io/jwt/ for the full documentation.

Perform tests

Run ginkgo tests with the following command:

ginkgo -r -v -p --cover --coverpkg=github.com/ginger-go/jwt

Read the coverage report with the following command:

go tool cover -html=coverprofile.out

# Functions

FromToken parses a token and returns the claims.
FromTokenUnverified parses a token without secret and returns the claims.
NewClaims creates a new Claims instance.
RefreshToken refreshes a token.
ToToken creates a token from the claims.

# Structs

Claims is a simple claims implementation that can be used to store and retrieve claims data.