Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
44 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, array $arguments = []) |
||
45 | { |
||
46 | $response = ResponseBridge::fromOAuth2( |
||
47 | $this->server->handleTokenRequest(RequestBridge::toOAuth2($request)) |
||
48 | ); |
||
49 | |||
50 | if ($response->hasHeader('Content-Type')) { |
||
51 | return $response; |
||
52 | } |
||
53 | |||
54 | return $response->withHeader('Content-Type', 'application/json'); |
||
55 | } |
||
56 | } |
||
57 |