request->input('code', ''); if (empty($code)) { throw new BusinessException(AuthErrorCode::CODE_EMPTY_ERROR); } return $this->service->codeToOpenID($code); } /** * 刷新token * * @return array */ #[Middleware(AuthMiddleware::class)] #[GetMapping(path: "auth/refresh_token")] public function refreshToken() : array { return $this->service->refreshToken(); } }