Registry / auth / golang-jwt-jwt-v4

golang-jwt-jwt-v4

JSON →
library4.5.2gogounverified

Package jwt is a Go implementation of JSON Web Tokens.

go get github.com/golang-jwt/jwt/v4
INSTALL
IMPORT
SIG · GOLANG-JWT-JWT-V4
G
golang-jwt-jwt-v4
authgov4.5.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/golang-jwt/jwt/v4

Create and sign a JWT token

package main import ( "fmt" "github.com/golang-jwt/jwt/v4" ) func main() { token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaims{ "foo": "bar", }) tokenString, err := token.SignedString([]byte("secret")) if err != nil { fmt.Println(err) return } fmt.Println(tokenString) }
Debug
Known issues
breakingBreaking changes from v3 to v4: removed deprecated functions and changed validation behavior
fix
Update imports to github.com/golang-jwt/jwt/v4 and adjust code for new API
affects: >=4.0.0
Upgrade
Version history
4.5.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
16
OpenAI (training)
1
Resources
golang-jwt-jwt-v4 — go get golang-jwt-jwt-v4 · libregistry