Conditions | 4 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
30 | public function onPostRespond(ResponseEvent $event): void |
||
31 | { |
||
32 | $request = $event->getRequest(); |
||
33 | $attributes = $this->getAttributes($request); |
||
34 | if ( |
||
35 | !($operation = $attributes['operation'] ?? null) |
||
36 | || 'me' !== $operation->getName() |
||
37 | || !($response = $event->getResponse()) instanceof JWTAuthenticationFailureResponse) { |
||
38 | return; |
||
39 | } |
||
40 | $response->headers->setCookie($this->mercureAuthorization->getClearAuthorizationCookie()); |
||
41 | } |
||
43 |