Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- type Service
- func (s *Service) Authenticate(ctx context.Context, username string, password string) (*models.User, error)
- func (s *Service) CookieName() string
- func (s *Service) Login(ctx context.Context, username string, password string) (string, Session, error)
- func (s *Service) Logout(token string)
- func (s *Service) RevokeUserSessions(userID string)
- func (s *Service) Session(token string) (Session, bool)
- type Session
- type UserStore
Constants ¶
View Source
const ( DefaultCookieName = "emerald_session" DefaultSessionTTL = 24 * time.Hour )
Variables ¶
View Source
var ErrInvalidCredentials = errors.New("invalid credentials")
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) Authenticate ¶
func (*Service) CookieName ¶
func (*Service) RevokeUserSessions ¶
Click to show internal directories.
Click to hide internal directories.