type
AuthSession
type AuthSession[User any] struct {
// ID is the safe, non-secret identifier used for session management.
ID string `json:"id"`
// Collection is the auth-enabled collection that owns the user identity.
Collection string `json:"collection"`
// User is the current authenticated document.
User User `json:"user"`
// ExpiresAt is the session's RFC 3339 expiry timestamp.
ExpiresAt string `json:"expiresAt"`
}Framework session metadata plus a typed authenticated user.
Source protocol/envelope.go:202
IDstring- ID is the safe, non-secret identifier used for session management.
Collectionstring- Collection is the auth-enabled collection that owns the user identity.
UserUser- User is the current authenticated document.
ExpiresAtstring- ExpiresAt is the session's RFC 3339 expiry timestamp.
ID is a safe management identifier, not a bearer token. Collection disambiguates identities when several auth collections exist.