@gibme/webserver
    Preparing search index...

    Type Alias ProtectedRouter

    ProtectedRouter: express.Router & {
        setAuthenticationProvider: (provider?: AuthenticationProvider) => void;
    }

    Creates a mountable Router instance whose routes are all gated by an authentication provider. Behaves like the exported Router() factory (including optional route-parameter rewriting), with the addition of setAuthenticationProvider.

    Type Declaration

    • setAuthenticationProvider: (provider?: AuthenticationProvider) => void

      Sets the authentication provider used to gate every route registered on this router. The provider is consulted on each request, so calling this after routes are already registered updates authentication for all of them.