IFClite TypeScript API
    Preparing search index...

    Type Alias BlobAuthorizeFn

    BlobAuthorizeFn: (
        token: string | undefined,
        method: string,
        hash: string | undefined,
    ) => Promise<boolean> | boolean

    Authorizer for blob requests. Returns true to allow the operation, false to reject with 401. method is the HTTP verb, hash is the target hash (undefined for the /blobs list endpoint). token is the bearer / ?token= credential lifted from the request. Reuses the same credential the websocket sync path consumes.

    Type Declaration

      • (
            token: string | undefined,
            method: string,
            hash: string | undefined,
        ): Promise<boolean> | boolean
      • Parameters

        • token: string | undefined
        • method: string
        • hash: string | undefined

        Returns Promise<boolean> | boolean