Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceClaims ¶
type ServiceClaims struct {
ServiceType string `json:"typ"`
ServiceID string `json:"id"`
jwt.RegisteredClaims
}
type TokenManager ¶
type TokenManager struct {
// contains filtered or unexported fields
}
func NewTokenManager ¶
func NewTokenManager(secret string) *TokenManager
func (*TokenManager) Validate ¶
func (t *TokenManager) Validate(expectedType, expectedID, token string) bool
Validate verifies the JWT signature and claims: typ must match, id must match when expectedID is non-empty. No expiration is enforced; tokens may omit exp based on current requirements.
Click to show internal directories.
Click to hide internal directories.