11.6 OAAでのチャレンジ・ファクタへのユーザーの登録

OAAは、ユーザーを特定のチャレンジ・ファクタに登録するためのREST APIを提供します。

<OAAService>/preferences/v1 REST APIを使用して、ユーザーに必要なチャレンジ・ファクタを登録します。

<OAAService> URLの検索および認証の詳細は、「OAAランタイムAPI」を参照してください。

プリファレンスRESTエンドポイントの詳細は、「OAAランタイムのREST API」を参照してください。これらのファクタは、セルフサービス・ポータルでユーザーがさらに管理できます。詳細は、「セルフサービス・ポータルでのファクタの管理」を参照してください。

例1: ユーザーをOracle Mobile Authenticator (OMA)に登録するサンプル・リクエスト

次のサンプル・リクエストは、groupID UserGroup1のユーザーtestuser1をOMAに登録する方法を示しています:

curl --location -g --request POST '<OAAService>/preferences/v1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '{
    "userId": "testUser1",
    "groupId": "UserGroup1",
  "factorsRegistered": [            
            {
              "factorAttributes": [
                {
                  "factorAttributeValue": [
                    {
                      "value": "omasecretvalue1",
                      "name": "Device1",
                      "isEnabled": true
                    }
                  ],
                  "factorAttributeName": "omatotpsecretkey"
                }
              ],
              "factorKey": "ChallengeOMATOTP",
              "isPreferred": false,
              "isValidated": true
            }
          ]
        }'

ノート:

factorAttribueValuevalueは、英数字のみをサポートします。

例2: ユーザーを電子メールに登録するサンプル・リクエスト

次のサンプル・リクエストは、groupID UserGroup1のユーザーtestuser1を電子メールに登録する方法を示しています:

curl --location -g --request POST '<OAAService>/preferences/v1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '{
    "userId": "testUser1",
    "groupId": "UserGroup1",
  "factorsRegistered": [
            {
              "factorAttributes": [
                {
                  "factorAttributeValue": [
                    {
                      "value": "test.user@example.com",
                      "name": "Device1",
                      "isEnabled": true
                    }
                  ],
                  "factorAttributeName": "email"
                }
              ],
              "factorKey": "ChallengeEmail",
              "isPreferred": false,
              "isValidated": true
            },
ユーザーが登録されると、セルフサービス・ポータルを使用してファクタを管理できます。「セルフサービス・ポータルでのファクタの管理」を参照してください。

ノート:

パラメータisValidatedはデフォルトでtrueです。「ファクタ検証の構成」に従ってファクタ検証を使用する場合、isValidatedtrueの場合、ユーザーは検証済として登録されますが、値がfalseに設定されている場合、ユーザーは未検証として登録されます。