|
4 | 4 | [](https://www.npmjs.com/package/@fastify/auth)
|
5 | 5 | [](https://standardjs.com/)
|
6 | 6 |
|
7 |
| -This module does not provide an authentication strategy, but it provides a very fast utility to handle authentication (and multiple strategies) in your routes, without adding overhead. |
| 7 | +This module does not provide an authentication strategy, but it provides a very fast utility to handle authentication (and multiple strategies) in your routes, without adding overhead. |
8 | 8 | Check out a complete example [here](test/example.js).
|
9 | 9 |
|
10 | 10 | ## Install
|
@@ -111,10 +111,10 @@ fastify
|
111 | 111 | If the `relation` (`defaultRelation`) parameter is `and`, then the relation inside sub-arrays will be `or`.
|
112 | 112 | If the `relation` (`defaultRelation`) parameter is `or`, then the relation inside sub-arrays will be `and`.
|
113 | 113 |
|
114 |
| -| auth code | resulting logical expression | |
115 |
| -| ------------- |:-------------:| |
116 |
| -| `fastify.auth([f1, f2, [f3, f4]], { relation: 'or' })` | `f1 OR f2 OR (f3 AND f4)` | |
117 |
| -| `fastify.auth([f1, f2, [f3, f4]], { relation: 'and' })` | `f1 AND f2 AND (f3 OR f4)` | |
| 114 | +| auth code | resulting logical expression | |
| 115 | +| ------------- |:-------------:| |
| 116 | +| `fastify.auth([f1, f2, [f3, f4]], { relation: 'or' })` | `f1 OR f2 OR (f3 AND f4)` | |
| 117 | +| `fastify.auth([f1, f2, [f3, f4]], { relation: 'and' })` | `f1 AND f2 AND (f3 OR f4)` | |
118 | 118 |
|
119 | 119 |
|
120 | 120 | You can use the `defaultRelation` option while registering the plugin, to change the default `relation`:
|
|
0 commit comments