You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will tell `ApplyAuthenticationMiddleware` to check for `authentication_transport` attribute, and apply it to request and response if found.
219
219
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):
221
221
222
222
```php
223
-
$middleware_stack->add(new ApplyAuthenticationMiddleware('authentication_transport', true)); // Apply when exiting
**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