> ## Documentation Index
> Fetch the complete documentation index at: https://translations.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Database/AD/LDAP（アクティブ）

> データベース、AD、LDAP 接続用の非推奨のアクティブ認証エンドポイントです。代わりにリソースオーナーパスワードグラントを使用してください。

export const ResponseSchema = ({statusCode, type = "{}", children}) => {
  const [open, setOpen] = useState(false);
  return <div className="border border-gray-100 dark:border-gray-800 rounded-lg mb-3 overflow-hidden">
      <div className={`flex items-center gap-2.5 px-4 py-2.5 cursor-pointer select-none ${open ? "bg-gray-50 dark:bg-gray-800" : ""}`} onClick={() => setOpen(!open)}>
        {statusCode && <span className="border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 font-mono text-xs px-1.5 py-0.5 rounded">
            {statusCode.startsWith("default") ? "default" : statusCode}
          </span>}
        <span className="text-gray-500 dark:text-gray-400 text-sm font-mono">
          {type}
        </span>
        <span className="text-gray-400 dark:text-gray-500 text-sm italic">
          application/json
        </span>
        <svg className={`ml-auto opacity-50 transition-transform duration-200 ${open ? "rotate-180" : ""}`} width="16" height="16" viewBox="0 0 16 16" fill="none">
          <path d="M4 6l4 4 4-4" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        </svg>
      </div>
      {open && <div className="px-4 pt-1 pb-3 border-t border-gray-100 dark:border-gray-800">
          {children}
        </div>}
    </div>;
};

<div id="endpoint">
  ## エンドポイント
</div>

`POST /oauth/ro`

<Note>
  このエンドポイントはレガシー認証パイプラインの一部であり、現在は [Password Grant](#resource-owner-password) に置き換えられています。最新の認証パイプラインの詳細については、[Introducing OIDC Conformant Authentication](/ja/api-auth/intro) を参照してください。
</Note>

このエンドポイントは、API ベースの (アクティブな) 認証に使用します。ユーザーの認証情報と指定した `connection` に基づいて、プロバイダー側で認証を実行し、アクセストークンと IDトークン を含む JSON を返します。

<div id="remarks">
  ### 備考
</div>

* このエンドポイントは、データベース接続、パスワードレス接続、Active Directory/LDAP、Windows Azure AD、ADFS でのみ動作します。

* パッシブ認証とアクティブ認証の主な違いは、前者はブラウザー上で [Auth0 Login Page](http://manage.auth0.com/login) を通じて行われるのに対し、後者はどこからでも (スクリプト、サーバー間通信など) 呼び出せることです。

* auth0.js のサンプルスクリプトでは、ライブラリのバージョン 8 を使用しています。auth0.js バージョン 7 を使用している場合は、この[リファレンスガイド](https://auth0.com/docs/libraries/auth0js/v7)を参照してください。

<div id="learn-more">
  ### 詳細情報
</div>

* [データベースIDプロバイダー](https://auth0.com/docs/authenticate/database-connections)
* [ユーザー名/パスワード認証のレート制限](https://auth0.com/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy)
* [Active Directory/LDAP Connector](https://auth0.com/docs/authenticate/identity-providers/enterprise-identity-providers/active-directory-ldap/ad-ldap-connector)

<div id="body-parameters">
  ## ボディパラメーター
</div>

<ParamField body="client_id" type="string" required>
  アプリケーションの `client_id`。
</ParamField>

<ParamField body="username" type="string" required>
  ログインするユーザーのユーザー名/メールアドレス。
</ParamField>

<ParamField body="password" type="string" required>
  ログインするユーザーのパスワード。
</ParamField>

<ParamField body="connection" type="string" required>
  ログインに使用する接続の名前。
</ParamField>

<ParamField body="scope" type="string">
  IDトークンも取得するには、`openid` に設定します。
</ParamField>

<ParamField body="grant_type" type="string" required>
  `password` または `urn:ietf:params:oauth:grant-type:jwt-bearer` に設定します。
</ParamField>

<ParamField body="device" type="string">
  `grant_type` が `urn:ietf:params:oauth:grant-type:jwt-bearer` の場合に必須です。
</ParamField>

<ParamField body="id_token" type="string">
  `grant_type` が `urn:ietf:params:oauth:grant-type:jwt-bearer` の場合に必須です。
</ParamField>

<div id="response-schema">
  ## レスポンススキーマ
</div>

<ResponseSchema statusCode="200">
  <ResponseField name="id_token" type="string">
    IDトークン。
  </ResponseField>

  <ResponseField name="access_token" type="string">
    アクセストークン。
  </ResponseField>

  <ResponseField name="token_type" type="string">
    トークンの種類。通常は `Bearer` です。
  </ResponseField>
</ResponseSchema>

<ResponseSchema statusCode="400">
  <ResponseField name="error" type="string">
    エラーコード。
  </ResponseField>

  <ResponseField name="error_description" type="string">
    エラーの説明。
  </ResponseField>
</ResponseSchema>

<div id="response-messages">
  ## レスポンスメッセージ
</div>

| ステータス | 説明           |
| ----- | ------------ |
| 200   | 認証に成功したレスポンス |
| 400   | 不正なリクエスト     |
