type

AuthSession

A newly authenticated session and its one-time raw token.

Properties

PropertyTypeDescription
IDstringNon-secret session identifier.
TokenstringOne-time opaque bearer credential returned when the session is created.
Collectionschema.CollectionSlugAuth-enabled collection that owns User.
Userstore.DocumentCurrent authenticated content document.
ExpiresAttime.TimeAbsolute 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 }

Source core/auth.go:22