Skip to content

Commit 7ececb5

Browse files
committed
Update README.md
1 parent 80d0816 commit 7ececb5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -212,17 +212,19 @@ During request handling, authentication can change:
212212
System can communicate these changes by making appropriate authentication transports that encapuslate information aboute these events available as request attributes, and handing them over to `ActiveCollab\Authentication\Middleware\ApplyAuthenticationMiddleware`:
213213

214214
```php
215-
$middleware_stack->add(new ApplyAuthenticationMiddleware('authentication_transport'));
215+
$middleware_stack->add(new ApplyAuthenticationMiddleware(
216+
'authentication_transport'
217+
));
216218
```
217219

218220
This will tell `ApplyAuthenticationMiddleware` to check for `authentication_transport` attribute, and apply it to request and response if found.
219221

220-
Second argument of `ApplyAuthenticationMiddleware`'s constructor is `$apply_on_exit` argument. It lets you configure when transport will be applied - when entering middleware stack, or when existing it. Default is `FALESE` (when entering middleware stack):
222+
Second argument of `ApplyAuthenticationMiddleware`'s constructor is `$apply_on_exit` argument. It lets you configure when transport will be applied - when entering middleware stack, or when existing it. Default is `false` (when entering middleware stack):
221223

222224
```php
223225
$middleware_stack->add(new ApplyAuthenticationMiddleware(
224226
'authentication_transport',
225-
true // Apply when exiting
227+
true // Apply when exiting middleware stack.
226228
));
227229
```
228230

0 commit comments

Comments
 (0)