Skip to content

Commit

Permalink
Improve wording of auth strategy mode/default
Browse files Browse the repository at this point in the history
I found this wording confusing, and noticed other people have as well (e.g. dwyl/hapi-auth-jwt2#137 ).  I think the proposed update better reflects when `server.auth.strategy` sets a default strategy for routes.
  • Loading branch information
william-riley-land committed Apr 29, 2016
1 parent 40dbdc1 commit c524b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit c524b90

Please sign in to comment.