type

AuthContext

Request and actor state supplied to an authentication rule or hook.

Properties

PropertyTypeDescription
Contextcontext.ContextCarries request cancellation and deadlines.
OperationAuthOperationIdentifies the authentication lifecycle boundary.
CollectionIDschema.StableIDIdentifies the target auth collection.
User*store.DocumentThe current user when one has been resolved.
IdentitystringThe normalized login identity when applicable.
IPAddressstringThe resolved direct or trusted-forwarded client address.
UserAgentstringThe request user-agent metadata.
Local*LocalAPIEnters ordinary access-controlled content operations.

How it works

Passwords, bearer tokens, reset tokens, and API keys are intentionally never included.

Full signature

type AuthContext struct { Context context.Context Operation AuthOperation CollectionID schema.StableID User *store.Document Identity string IPAddress string UserAgent string Local *LocalAPI }

Source core/auth_contract.go:28