From c524b90e3fbca49e80e925bdcc1f2aac612d775f Mon Sep 17 00:00:00 2001 From: "William P. Riley-Land" Date: Fri, 29 Apr 2016 11:43:23 -0500 Subject: [PATCH] Improve wording of auth strategy mode/default I found this wording confusing, and noticed other people have as well (e.g. https://github.com/dwyl/hapi-auth-jwt2/issues/137 ). I think the proposed update better reflects when `server.auth.strategy` sets a default strategy for routes. --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index 67976a606..e069b6513 100755 --- a/API.md +++ b/API.md @@ -649,7 +649,7 @@ Registers an authentication strategy where: - `name` - the strategy name. - `scheme` - the scheme name (must be previously registered using [`server.auth.scheme()`](#serverauthschemename-scheme)). -- `mode` - if `true`, the scheme is automatically assigned as a required strategy to any route +- `mode` - unless set to `false`, the scheme is automatically assigned as the default strategy for any route without an `auth` config. Can only be assigned to a single server strategy. Value must be `true` (which is the same as `'required'`) or a valid authentication mode (`'required'`, `'optional'`, `'try'`). Defaults to `false`.