API Reference
CyberGo JWT provides a complete JWT token lifecycle management API.
Module Structure
| Module | Description | Details |
|---|---|---|
| Package Functions | New, DefaultConfig, NewRateLimiter and other factory functions | Construction & Initialization |
| Processor | Token creation, validation, refresh, and revocation core methods | Core Operations |
| Config | Config, BlacklistConfig configuration structures | Configuration Management |
| Claims | Claims, RegisteredClaims claim types | Token Claims |
| Interfaces | TokenManager, CustomClaims, BlacklistStore, etc. | Extension Interfaces |
| Types & Constants | Signing method constants, NumericDate, StringOrSlice, etc. | Auxiliary Types |
| Errors | 17 sentinel errors, ValidationError | Error Handling |
Quick Lookup
By Use Case
| Use Case | Related API |
|---|---|
| Create Processor | jwt.New(), jwt.DefaultConfig() |
| Issue token | Processor.Create(), Processor.CreateRefresh() |
| Validate token | Processor.Validate(), Processor.ValidateInto() |
| Refresh token | Processor.Refresh(), Processor.RefreshInto() |
| Revoke token | Processor.Revoke(), Processor.IsRevoked() |
| Configure signing algorithm | Config.SigningMethod |
| Custom Claims | CustomClaims interface |
| Blacklist management | BlacklistStore interface |
| Rate limiting | RateLimitProvider interface |
| Error handling | Sentinel Errors |