Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HookedTokenManager ¶
type HookedTokenManager struct { Setter func(subject, token string) error Getter func(subject string) (string, error) }
HookedTokenManager is just a dummy wrapper around a TokenManager where a user can provide functions without having to wrap everything in a full struct
func (*HookedTokenManager) Get ¶
func (m *HookedTokenManager) Get(subject string) (string, error)
Get invokes the user-defined Getter
func (*HookedTokenManager) Set ¶
func (m *HookedTokenManager) Set(subject, token string) error
Set invokes the user-defined Setter
type MemoryTokenManager ¶
type MemoryTokenManager struct {
// contains filtered or unexported fields
}
MemoryTokenManager just shoves the token some place in an in memory cache
func NewMemoryTokenManager ¶
func NewMemoryTokenManager() *MemoryTokenManager
NewMemoryTokenManager initializes a MemoryTokenManager
func (*MemoryTokenManager) Get ¶
func (m *MemoryTokenManager) Get(subject string) (string, error)
Get returns a token from the cache
func (*MemoryTokenManager) Set ¶
func (m *MemoryTokenManager) Set(subject, token string) error
Set stores the token in the cache
Click to show internal directories.
Click to hide internal directories.