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
}
]
}'
ノート:
factorAttribueValue
のvalue
は、英数字のみをサポートします。
例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
です。「ファクタ検証の構成」に従ってファクタ検証を使用する場合、isValidated
がtrue
の場合、ユーザーは検証済として登録されますが、値がfalse
に設定されている場合、ユーザーは未検証として登録されます。