/**
  * Show user.
  *
  * @param ServerRequestInterface $request
  * @param ResponseInterface $response
  * @return \Psr\Http\Message\MessageInterface
  */
 public function user(ServerRequestInterface $request, ResponseInterface $response)
 {
     $response->write($this->json->render($this->user->toArray()));
     return $this->json->response($response);
 }
 /**
  * Ping action.
  *
  * @param ServerRequestInterface $request
  * @param ResponseInterface $response
  * @return string
  */
 public function ping(ServerRequestInterface $request, ResponseInterface $response)
 {
     $data = ['ack' => time(), 'target' => __METHOD__];
     $response->write($this->json->render($data));
     return $this->json->response($response);
 }