Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecodedToken ¶
DecodedToken holds a raw JWT string alongside its expiration time so the payload is only parsed once and callers can check validity cheaply.
func (*DecodedToken) IsValid ¶
func (t *DecodedToken) IsValid() bool
IsValid reports whether the token is non-nil and has more than expiryBuffer time remaining before expiration.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser wraps golang-jwt's parser and exposes convenience methods for working with JWTs. Each platform inspector creates its own instance and passes its own claims struct to ParseUnverified.
func NewParser ¶
func NewParser() *Parser
NewParser creates a Parser with default options. concurrent safe
func (*Parser) ParseUnverified ¶
ParseUnverified decodes raw into claims without verifying the signature. It extracts and returns the expiration time from the standard exp claim. claims must implement jwt.Claims — typically a struct that embeds jwt.RegisteredClaims plus any platform-specific fields.
Signature verification is intentionally skipped: we consume third-party tokens and do not have access to the signing key.