• 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()
    

    Or:

     apis.RequireRecordAuth("users", "supervisors")
    

    To restrict the auth record only to the loaded context collection, use [apis.RequireSameContextRecordAuth()] instead.

    Parameters

    • Rest ...optCollectionNames: string[]

    Returns MiddlewareFunc

Generated using TypeDoc