Documentation
¶
Overview ¶
Package session defines the Session entity: an opaque, server-side persisted authentication session.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
ID string `json:"id"`
UserID string `json:"user_id"`
TokenHash string `json:"token_hash"`
IPAddress string `json:"ip_address"`
UserAgent string `json:"user_agent"`
ExpiresAt time.Time `json:"expires_at"`
RevokedAt *time.Time `json:"revoked_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Session is a server-side session. The plaintext token is only returned to the client once, at creation; the store keeps TokenHash exclusively.
Click to show internal directories.
Click to hide internal directories.