Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidToken = errors.New("invalid token")
)
Functions ¶
func ContextWithSession ¶
ContextWithSession wraps context with session value
Types ¶
type ContextKey ¶
type ContextKey string
ContextKey is session context key.
Used to mitigate SA1029 linter issue, that's all.
type Credentials ¶
type LoginResult ¶
type Session ¶
type Session struct { ID uuid.UUID `json:"id"` UserID user.ID `json:"user_id"` LoggedAt time.Time `json:"logged_at"` TTL time.Duration `json:"ttl"` }
Session contains user auth session
func NewSession ¶
NewSession returns new session
func SessionFromContext ¶
SessionFromContext returns session from context
Click to show internal directories.
Click to hide internal directories.