public function createJsonAuthResponse(BaseUser $user)
    {
        $responseModel = $this->createResponseAuthModel($user);

        $response = new JsonResponse($responseModel->getBody(), Response::HTTP_CREATED);

        return $this->setCookieForResponse($response, $responseModel);
    }
public function createJsonAuthResponse(BaseUser $user)
    {
        $responseModel = $this->createResponseAuthModel($user);

        $response = new JsonResponse($responseModel->getBody(), Response::HTTP_CREATED);

        return $this->setCookieForResponse($response, $responseModel);
    }
public function createJsonAuthResponse ( BaseUser $ user ) { $ responseModel = $ this -> createResponseAuthModel ( $ user ) ; $ response = new JsonResponse ( $ responseModel -> getBody ( ) , Response :: HTTP_CREATED ) ; return $ this -> setCookieForResponse ( $ response , $ responseModel ) ; }
Creates a json response that will contain new credentials for the user.

@param BaseUser $user
@return JsonResponse|Response
Creates a json response that will contain new credentials for the user .