xmpp-httpx - v0.11.0
    Preparing search index...

    Type Alias AuthorizeFn

    AuthorizeFn: (
        from: string,
        req: { method: string; resource: string; to: string },
    ) => boolean | Promise<boolean>

    Authorization hook run for every before the body is consumed. XEP-0332 §9 describes roster policies (public/manual/private/provisioned); these helpers cover the stateless ones. Roster-subscription-driven policies belong to the application, which owns presence handling.

    Type Declaration

      • (
            from: string,
            req: { method: string; resource: string; to: string },
        ): boolean | Promise<boolean>
      • Parameters

        • from: string
        • req: { method: string; resource: string; to: string }

        Returns boolean | Promise<boolean>