From f53c2c4e3b0e8e244bee512931c80f887715db77 Mon Sep 17 00:00:00 2001 From: Catrobot Date: Wed, 25 Nov 2020 09:47:53 +0000 Subject: [PATCH] Automated php-cs-fixer --- Api/AuthenticationApiInterface.php | 2 -- Controller/AuthenticationController.php | 15 ++------------- Resources/docs/Api/AuthenticationApiInterface.md | 6 +++--- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/Api/AuthenticationApiInterface.php b/Api/AuthenticationApiInterface.php index e46371d6..19fb7fc3 100644 --- a/Api/AuthenticationApiInterface.php +++ b/Api/AuthenticationApiInterface.php @@ -68,8 +68,6 @@ public function authenticationGet(&$responseCode, array &$responseHeaders); * @param OpenAPI\Server\Model\RefreshRequest $refresh_request (required) * @param int $responseCode The HTTP response code to return * @param array $responseHeaders Additional HTTP headers to return with the response () - * - * @return OpenAPI\Server\Model\JWTResponse */ public function authenticationLogoutPost(RefreshRequest $refresh_request, &$responseCode, array &$responseHeaders); diff --git a/Controller/AuthenticationController.php b/Controller/AuthenticationController.php index af31fd45..58724b00 100644 --- a/Controller/AuthenticationController.php +++ b/Controller/AuthenticationController.php @@ -131,16 +131,6 @@ public function authenticationLogoutPostAction(Request $request) return new Response('', 415); } - // Figure out what data format to return to the client - $produces = ['application/json']; - // Figure out what the client accepts - $clientAccepts = $request->headers->has('Accept') ? $request->headers->get('Accept') : '*/*'; - $responseFormat = $this->getOutputFormat($clientAccepts, $produces); - if (null === $responseFormat) - { - return new Response('', 406); - } - // Handle authentication // Authentication 'PandaAuth' required // HTTP basic authentication required @@ -181,7 +171,7 @@ public function authenticationLogoutPostAction(Request $request) $handler->setPandaAuth($securityPandaAuth); // Make the call to the business logic - $responseCode = 200; + $responseCode = 204; $responseHeaders = []; $result = $handler->authenticationLogoutPost($refresh_request, $responseCode, $responseHeaders); @@ -208,12 +198,11 @@ public function authenticationLogoutPostAction(Request $request) } return new Response( - null !== $result ? $this->serialize($result, $responseFormat) : '', + '', $responseCode, array_merge( $responseHeaders, [ - 'Content-Type' => $responseFormat, 'X-OpenAPI-Message' => $message, ] ) diff --git a/Resources/docs/Api/AuthenticationApiInterface.md b/Resources/docs/Api/AuthenticationApiInterface.md index 764e644d..5ea06987 100644 --- a/Resources/docs/Api/AuthenticationApiInterface.md +++ b/Resources/docs/Api/AuthenticationApiInterface.md @@ -75,7 +75,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) ## **authenticationLogoutPost** -> OpenAPI\Server\Model\JWTResponse authenticationLogoutPost($refresh_request) +> authenticationLogoutPost($refresh_request) Expires refresh token @@ -115,7 +115,7 @@ Name | Type | Description | Notes ### Return type -[**OpenAPI\Server\Model\JWTResponse**](../Model/JWTResponse.md) +void (empty response body) ### Authorization @@ -124,7 +124,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)