Documentation
¶
Overview ¶
Package auth provides token storage for Hub-Agent authentication.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenStore ¶
type TokenStore struct {
// contains filtered or unexported fields
}
TokenStore manages authentication tokens for connected Agents.
func NewTokenStore ¶
func NewTokenStore() (*TokenStore, error)
NewTokenStore creates a new token store.
func (*TokenStore) GetHubID ¶
func (s *TokenStore) GetHubID() string
GetHubID returns the unique Hub identifier.
func (*TokenStore) GetToken ¶
func (s *TokenStore) GetToken(agentID string) string
GetToken returns the token for an Agent, or empty string if not found.
func (*TokenStore) HasToken ¶
func (s *TokenStore) HasToken(agentID string) bool
HasToken returns true if a token exists for the Agent.
func (*TokenStore) RemoveToken ¶
func (s *TokenStore) RemoveToken(agentID string) error
RemoveToken removes the token for an Agent.
func (*TokenStore) SaveToken ¶
func (s *TokenStore) SaveToken(agentID, token string) error
SaveToken stores a token for an Agent.
Click to show internal directories.
Click to hide internal directories.