/** * Refresh a login token * * @return ApiResponse */ public function refresh() { $token = $this->jwtAuth->getTokenFromRequest(); // Get the user to make sure the token is fully valid $this->jwtAuth->getUser(); $token = $this->jwtAuth->refresh($token); return $this->getResponse()->transformer($this->getTransformer())->item($token); }