Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // TokenExpiration is the duration for which a token is valid TokenExpiration time.Duration // SecretKey is the key used to sign tokens SecretKey string }
Config represents token manager configuration
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles token generation and validation
func NewManager ¶
NewManager creates a new token manager
func (*Manager) GenerateToken ¶
GenerateToken creates a new JWT token for an agent
func (*Manager) ValidateToken ¶
ValidateToken checks if a token is valid
Click to show internal directories.
Click to hide internal directories.