Node: jsonwebtokengithub.com/sahilkhaire/gox/jwt
SignOptions
Overview
SignOptions configures token signing.
Part of the jwt package — Node.js analog: jsonwebtoken.
SignOptions is a type exported by gox. Methods on this type are documented separately.
Signature
go
type SignOptions struct {
ExpiresIn time.Duration
Method jwtlib.SigningMethod
}Compare: Node.js · Standard Go · gox
js
// Typical jsonwebtoken pattern in Node.jsgo
// github.com/golang-jwt/jwt/v5 token.Sign / Parsego
import "github.com/sahilkhaire/gox/jwt"
opts := &jwt.SignOptions{ExpiresIn: time.Hour}Example
go
import "github.com/sahilkhaire/gox/jwt"
opts := &jwt.SignOptions{ExpiresIn: time.Hour}Tips
Browse methods on this type in the sidebar for handler-style APIs and options structs.
Standard library alternative
gox wraps the Go standard library or a trusted dependency with Node-familiar naming. You can use the underlying library directly — see the package overview for escape hatches.