src/AppBundle/Security/ApiAuthentification.php
/**
     * @param Request $request
     * @param AuthenticationException|null $authException
     * @return JsonResponse
     */
@param Request $request
@param AuthenticationException|null $authException
@return JsonResponse
@param Request $request @param AuthenticationException|null $authException @return JsonResponse
public function start(Request $request, AuthenticationException $authException = null):JsonResponse
    {
        $data = [
            'message' => 'Authentication Required'
        ];
        return new JsonResponse($data, Response::HTTP_UNAUTHORIZED);
    }
public function start ( Request $ request , AuthenticationException $ authException = null ) : JsonResponse { $ data = [ 'message' => 'Authentication Required' ] ; return new JsonResponse ( $ data , Response :: HTTP_UNAUTHORIZED ) ; }
@param Request $request
 @param AuthenticationException|null $authException
 @return JsonResponse
@param Request $request @param AuthenticationException|null $authException @return JsonResponse