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.
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.
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 ofsetAuthenticationProvider.