RequireRecordAuth middleware requires a request to have a valid record auth Authorization header.
The auth record could be from any collection.
You can further filter the allowed record auth collections by specifying their names.
Example:
apis.RequireRecordAuth() Copy
apis.RequireRecordAuth()
Or:
apis.RequireRecordAuth("users", "supervisors") Copy
apis.RequireRecordAuth("users", "supervisors")
To restrict the auth record only to the loaded context collection, use [apis.RequireSameContextRecordAuth()] instead.
Rest
Generated using TypeDoc
RequireRecordAuth middleware requires a request to have a valid record auth Authorization header.
The auth record could be from any collection.
You can further filter the allowed record auth collections by specifying their names.
Example:
Or:
To restrict the auth record only to the loaded context collection, use [apis.RequireSameContextRecordAuth()] instead.