type
AuthSession
A newly authenticated session and its one-time raw token.
Properties
| Property | Type | Description |
|---|---|---|
ID | string | Non-secret session identifier. |
Token | string | One-time opaque bearer credential returned when the session is created. |
Collection | schema.CollectionSlug | Auth-enabled collection that owns User. |
User | store.Document | Current authenticated content document. |
ExpiresAt | time.Time | Absolute UTC expiry time. |
How it works
Token is a bearer secret. Store it only in a secure HTTP-only cookie or equivalent secret store; protocol/session-list representations never expose it.
Full signature
type AuthSession struct {
// ID is the non-secret identifier used to manage this session.
ID string
// Token is the opaque credential accepted by session-aware transports.
Token string
// Collection is the auth-enabled collection that owns the identity.
Collection schema.CollectionSlug
// User is the current document from Collection.
User store.Document
// ExpiresAt is the absolute UTC expiry time.
ExpiresAt time.Time
// contains filtered or unexported fields
}