Documentation ¶
Index ¶
Constants ¶
View Source
const MinKeyLen = 32
Variables ¶
View Source
var (
ErrAlreadyRegistered = errors.New("registration failed: already registered")
)
Functions ¶
This section is empty.
Types ¶
type CachedSession ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(store store.Store, sessionCache *SessionCache) (*Service, error)
func (*Service) Authenticate ¶
func (*Service) Unregister ¶
type SessionCache ¶
type SessionCache struct {
// contains filtered or unexported fields
}
func NewSessionCache ¶
func NewSessionCache(cfg SessionCacheConfig) (*SessionCache, error)
func (*SessionCache) Delete ¶
func (t *SessionCache) Delete(clientID string)
func (*SessionCache) Get ¶
func (t *SessionCache) Get(token string) (CachedSession, error)
func (*SessionCache) Put ¶
func (t *SessionCache) Put(clientID, token string) error
type SessionCacheConfig ¶
type SessionCacheConfig struct {
ExpirationMinutes int `toml:"expiration_minutes"`
}
func (SessionCacheConfig) IsValid ¶
func (c SessionCacheConfig) IsValid() error
Click to show internal directories.
Click to hide internal directories.