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/v3
Creates and signs a JWT token.
package main
import (
"fmt"
"github.com/cristalhq/jwt/v3"
)
func main() {
key := []byte("secret")
signer, _ := jwt.NewSignerHS(jwt.HS256, key)
token, _ := jwt.NewBuilder(signer).Build(jwt.Claims{})
fmt.Println(string(token.Raw()))
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
3.1.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.