Documentation
¶
Index ¶
- Variables
- type Service
- func (s *Service) CreateSession(ctx context.Context, userID uuid.UUID) (*data.Session, error)
- func (s *Service) EmailSignIn(ctx context.Context, email string) (*data.User, error)
- func (s *Service) Logout(ctx context.Context, sessionID string) error
- func (s *Service) Token(ctx context.Context, tokenHash string) (*data.UserAuthToken, error)
- func (s *Service) UseToken(ctx context.Context, token string, usedAt time.Time) (*data.User, error)
- func (s *Service) ValidateSession(ctx context.Context, sessionID string) (*data.User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidEmail = errors.New("err.auth.invalid_email")
View Source
var ErrInvalidSession = errors.New("err.auth.invalid_session")
View Source
var ErrInvalidToken = errors.New("err.auth.invalid_token")
View Source
var ErrTokenExpired = errors.New("err.auth.token_expired")
View Source
var ErrTokenNotFound = errors.New("err.auth.token_not_found")
View Source
var ErrTokenReplay = errors.New("err.auth.token_replay")
View Source
var ErrTokenUserMismatch = errors.New("err.auth.token_user_mismatch")
View Source
var ErrUserAgentMismatch = errors.New("err.auth.user_agent_mismatch")
View Source
var ErrUserDisabled = errors.New("err.auth.user_disabled")
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CreateSession ¶
func (*Service) EmailSignIn ¶
Click to show internal directories.
Click to hide internal directories.