メインコンテンツにスキップ

Zentao

Zentao is an agile project management tool. It does not support OIDC natively; use the zentao-oidc module to integrate Casdoor SSO.

ステップ1: CasdoorとZentaoをデプロイする

Deploy Casdoor and Zentao. Ensure both are running and you can sign in to each.

ステップ2: Zentao OIDCサードパーティモジュールを統合する

以下のコマンドを実行してzentao-oidcをインストールします:

git clone https://github.com/casdoor/zentao-oidc.git

Alternatively, download the ZIP and unzip it.

このモジュールは、OpenIdのSSOにZentaoを統合するために使用されます。 使用方法は以下の通りです:

  1. Zentaoのモジュールとして使用するために、oidcディレクトリ全体をZentaoのモジュールにコピーします。 ダウンロードしたパッケージの名前を"oidc"に変更します。

  2. フィルターを設定します。

    Since the Zentao framework filters the parameters in the URL and does not allow spaces, add the following at the end of /config/my.php.

    $filter->oidc = new stdclass();
    $filter->oidc->index = new stdclass();
    $filter->oidc->index->paramValue['scope'] = 'reg::any';
  3. /module/commom/model.phpを変更します。

    匿名アクセスリストに'oidc'を追加し、model.phpisOpenMethodメソッドに行を追加します。

    public function isOpenMethod($module, $method)
    {
    if ($module == 'oidc' and $method == 'index') {
    return true;
    }
    }
  4. Zentaoのログイン画面を表示せずに、直接Casdoorのログイン画面に行きたい場合。

    /module/common/model.php内のpublic function checkPriv()の最後の行のコードを変更します。

    //return print(js::locate(helper::createLink('user', 'login', "referer=$referer")));
    return print(js::locate(helper::createLink('oidc', 'index', "referer=$referer")));
  5. framework/base/router.class.php内のsetSuperVars()メソッドを変更し、以下のステートメントをコメントアウトします。

    public function setSuperVars()
    // unset($_REQUEST);

ステップ3: Casdoorアプリケーションを設定する

  1. 新しいCasdoorアプリケーションを作成するか、既存のものを使用します。
  2. リダイレクトURLを追加します。Casdoorアプリケーション設定
  3. 使用したいプロバイダーを追加し、他の必要な設定を入力します。

ステップ4: Zentaoを設定する

oidcディレクトリ内のconfig.phpファイルを設定します。

$config->oidc->clientId = "<Your ClientId>";
$config->oidc->clientSecret = "<Your ClientSecret>";
$config->oidc->issuer = "http://localhost:8000";

module/oidc内のpublic function index()メソッドでリダイレクトURLを設定します。

$oidc->setRedirectURL($path."/zentao/oidc-index.html");

ここでのURLは、'oidc'モジュール内の'index'メソッドを呼び出すことを指します。 変数セパレータも設定する必要があります。 デフォルトでは、フレームワークはダッシュ("-")を使用します。 See the official Zentao framework docs for more details. "zentaoPHP框架"