Versions in this module Expand all Collapse all v0 v0.1.0 Jan 20, 2026 Changes in this version + var ErrTokenExpired = errors.New("token is expired") + var ErrTokenNotValidYet = errors.New("token is not yet valid (nbf)") + var File_pwt_proto protoreflect.FileDescriptor + type KeyFunc func(*Token) (interface{}, error) + type Token struct + Body *TokenBody + Header *TokenHeader + Method jwt.SigningMethod + func New(method jwt.SigningMethod, body *TokenBody) *Token + func NewVersioned(method jwt.SigningMethod, body *TokenBody, version string) *Token + func NewWithClaims(method jwt.SigningMethod, body *TokenBody) *Token + func Parse(tokenString string, keyFunc KeyFunc) (*Token, error) + func (t *Token) SignedString(key interface{}) (string, error) + type TokenBody struct + Aud string + Exp int64 + Iat int64 + Iss string + Jti string + Nbf int64 + Payload *structpb.Struct + Sub string + func (*TokenBody) Descriptor() ([]byte, []int) + func (*TokenBody) ProtoMessage() + func (c *TokenBody) Valid() error + func (c *TokenBody) ValidWithLeeway(leeway time.Duration) error + func (x *TokenBody) GetAud() string + func (x *TokenBody) GetExp() int64 + func (x *TokenBody) GetIat() int64 + func (x *TokenBody) GetIss() string + func (x *TokenBody) GetJti() string + func (x *TokenBody) GetNbf() int64 + func (x *TokenBody) GetPayload() *structpb.Struct + func (x *TokenBody) GetSub() string + func (x *TokenBody) ProtoReflect() protoreflect.Message + func (x *TokenBody) Reset() + func (x *TokenBody) String() string + type TokenHeader struct + Alg string + Version string + func (*TokenHeader) Descriptor() ([]byte, []int) + func (*TokenHeader) ProtoMessage() + func (x *TokenHeader) GetAlg() string + func (x *TokenHeader) GetVersion() string + func (x *TokenHeader) ProtoReflect() protoreflect.Message + func (x *TokenHeader) Reset() + func (x *TokenHeader) String() string