> ## 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.

# アウトオブバンド（OOB）で検証する

> プッシュ通知、SMS、音声通話などによるアウトオブバンド（OOB）チャレンジを使ってMFAを検証します。

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/token`

帯域外 (アウトオブバンド) チャレンジ (プッシュ通知、SMS、音声のいずれか) を使用して、多要素認証 (MFA) を検証します。アウトオブバンドチャレンジを使用してMFAを検証するには、アプリケーションから `/oauth/token` に対して `grant_type=http://auth0.com/oauth/grant-type/mfa-oob` を指定したリクエストを送信する必要があります。チャレンジレスポンスで受け取った `oob_code` と、`mfa_required` エラーの一部として受け取った `mfa_token` を含めてください。

このリクエストに対するレスポンスは、チャレンジ検証のステータスによって異なります。

* チャレンジが承認され、検証も完了している場合、レスポンスは `password` または `http://auth0.com/oauth/grant-type/password-realm` の grant type と同じです。
* チャレンジが拒否された場合は、`invalid_grant` エラーが返されます。これは、ユーザーがチャレンジを拒否したことを意味します。このレスポンスが最終結果となるため、この時点でポーリングを停止してください。
* チャレンジの検証がまだ保留中の場合 (つまり、承認も拒否もされていない場合) は、`authorization_pending` エラーが返されます。これは、数秒後に同じリクエストを再試行する必要があることを意味します。短い間隔で頻繁にリクエストすると、`slow_down` エラーが返されます。

チャレンジレスポンスに `binding_method: prompt` が含まれている場合、アプリはユーザーに `binding_code` の入力を求め、それをリクエストの一部として送信する必要があります。`binding_code` は通常、チャレンジの一部として含まれる6桁の数字 (OTPのようなもの) です。チャレンジレスポンスに `binding_method` が含まれていない場合は、`binding_code` は不要です。この場合、レスポンスは即座に返され、`invalid_grant` または `access_token` を受け取ります。

<div id="learn-more">
  ### 詳細はこちら
</div>

* [アウトオブバンド認証器を紐付ける](https://auth0.com/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/enroll-challenge-sms-voice-authenticators)

<div id="headers">
  ## ヘッダー
</div>

<ParamField header="DPoP" type="string">
  リクエストに対する DPoP 証明です。これは任意で、アプリケーションで Demonstrating Proof-of-Possession を使用している場合にのみ必要です。
</ParamField>

<div id="body-parameters">
  ## Body Parameters
</div>

<div className="prose-sm prose-gray dark:prose-invert">
  <span data-as="p">リクエスト本文は `application/x-www-form-urlencoded` 形式です。</span>
</div>

<ParamField body="grant_type" type="string" required>
  使用するフローを示します。OTP MFA の場合は、`http://auth0.com/oauth/grant-type/mfa-oob` を使用します。

  使用可能な値: `http://auth0.com/oauth/grant-type/mfa-oob`
</ParamField>

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

<ParamField body="client_assertion" type="string">
  アプリケーションの認証情報で署名されたアサーションを含む JWT。
</ParamField>

<ParamField body="client_assertion_type" type="string">
  値は `urn:ietf:params:oauth:client-assertion-type:jwt-bearer` です。

  使用可能な値: `urn:ietf:params:oauth:client-assertion-type:jwt-bearer`
</ParamField>

<ParamField body="client_secret" type="string">
  アプリケーションの Client Secret。
</ParamField>

<ParamField body="mfa_token" type="string" required>
  `mfa_required` エラーで受け取った `mfa_token`。
</ParamField>

<ParamField body="oob_code" type="string" required>
  チャレンジリクエストで受け取った oob コード。
</ParamField>

<ParamField body="binding_code" type="string">
  認証に使用しているサイドチャネルをメインチャネルに関連付けるためのコード。
</ParamField>

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

<ResponseSchema>
  <ResponseField name="access_token" type="string">
    検証が成功した際に返されるaccess token。
  </ResponseField>

  <ResponseField name="token_type" type="string">
    発行されたトークンの種類。
  </ResponseField>

  <ResponseField name="expires_in" type="integer">
    access tokenの有効期間 (秒数) 。
  </ResponseField>

  <ResponseField name="error" type="string">
    検証が保留中または失敗した場合に返されるエラーコード。
  </ResponseField>

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

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

| Status | Description                             |
| ------ | --------------------------------------- |
| 200    | アウトオブバンド 検証が成功した場合のレスポンス。               |
| 400    | パラメーターが不足しているか無効なため、不正なリクエストとなっています。    |
| 401    | 未認証です。`mfa_token` または `oob_code` が無効です。 |
