Registry / auth / cristalhq-jwt-v4

cristalhq-jwt-v4

JSON →
library4.0.2gogounverified

Package jwt represents JSON Web Token for Go.

go get github.com/cristalhq/jwt/v4
INSTALL
IMPORT
SIG · CRISTALHQ-JWT-V4
C
cristalhq-jwt-v4
authgov4.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

jwt
github.com/cristalhq/jwt/v4

Creates a signed JWT using HS256 with a secret key.

package main import ( "fmt" "github.com/cristalhq/jwt/v4" ) func main() { key := []byte("secret") signer, _ := jwt.NewSignerHS(jwt.HS256, key) claims := &jwt.RegisteredClaims{Issuer: "test"} token, _ := jwt.NewBuilder(signer).Build(claims) fmt.Println(string(token.Raw())) }
Debug
Known issues
breakingVersion 4 has breaking API changes from v3.
fix
Use v4 import path and updated API; refer to migration guide.
affects: >=4.0.0
Upgrade
Version history
4.0.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
18
Resources
cristalhq-jwt-v4 — go get cristalhq-jwt-v4 · libregistry