Skip to content

Commit 80d0816

Browse files
committed
Update README.md
1 parent 41bc56f commit 80d0816

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,13 @@ $middleware_stack->add(new ApplyAuthenticationMiddleware('authentication_transpo
217217

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

220-
Second argument of `ApplyAuthenticationMiddleware`'s constructor lets you configure when transport will be applied - when entering middleware stack, or when existing it. Default is when entering middleware stack:
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):
221221

222222
```php
223-
$middleware_stack->add(new ApplyAuthenticationMiddleware('authentication_transport', true)); // Apply when exiting
223+
$middleware_stack->add(new ApplyAuthenticationMiddleware(
224+
'authentication_transport',
225+
true // Apply when exiting
226+
));
224227
```
225228

226229
**Note**: Reason why we do this in a separate middleware, instead of exiting part of Authentication middleware is because we may need to clean up request (remove invalid cookie for example).

0 commit comments

Comments
 (0)