Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Expiry is the session expiry time for garbage collection purposes Expiry = time.Hour * 24 * 7 // 7 days // Skew is the amount of time before a session expires that we will consider it close to expiring Skew = time.Hour * 24 // 1 day )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
Identifier string `json:"identifier"`
Creation time.Time `json:"creation"`
Expiry time.Time `json:"expiry"`
Device bool `json:"device"`
Provider flow.Key `json:"provider"`
Creator string `json:"creator"`
Organization string `json:"organization"`
}
Session represents a user's authenticated session
func New ¶
New returns a new session for a user with the given kind key, provider key, creator identifier, and organization
func (*Session) CloseToExpiry ¶
CloseToExpiry returns true if the session is close to expiring
Click to show internal directories.
Click to hide internal directories.