| Oracle® Fusion Middleware Oracle Access Management開発者ガイド 11g リリース2 (11.1.2.2.0) for All Platforms B69537-08 |
|
![]() 前 |
![]() 次 |
この章では、Oracle Access Management Mobile and Social REST APIについて説明します。この章の内容は次のとおりです。
cURLの使用に関する注意
この章では、cURLを使用して、Mobile and SocialクライアントがMobile and Socialサーバーに送信するRESTコールについて説明します。cURLは、cURLのWebサイト(http://curl.haxx.se/)からダウンロードできるフリー・ソフトウェアです。
サーバーへのRESTコールの送信にcURLを使用することにより、Mobile and SocialクライアントとMobile and Socialサーバーとのやり取りについての理解を深めることができます。また、これを便利なトラブルシューティング・ツールとしても使用できます。
|
注意: Windowsでは、一重引用符(' )を含むcURLコマンドは失敗します。可能であれば、一重引用符のかわりに二重引用符( " )を使用してください。
コマンドに一重引用符と二重引用符の両方が必要な場合、二重引用符を円記号でエスケープし(例: |
|
注意: このガイドにおいて、cURLのコマンドおよびサーバー・レスポンスでの改行は、単に表示上の都合により使用されています。 |
この項では、Mobile and SocialのRESTサービスで使用するために予約されているリクエストおよびレスポンスの属性名について説明します。これらの属性は、説明のとおり、問合せパラメータ、HTTPヘッダーまたはそのヘッダーのJSON本文部分に含めることができます。
|
注意: すべての属性の名前および値では、大/小文字が区別されます。 |
この項で説明する属性名は次のとおりです。
この属性を使用して、クライアント・アプリケーションと互換性のある特定のバージョンのSDKを指定します。SDKバージョンを指定しない場合、Mobile and Socialサーバーではデフォルトで最新のSDKバージョンが使用されます。
-H "X-IDAAS-REST-VERSION:v1"
サンプル・リクエスト
curl -i
-H "Content-Type: application/json http://host.us.example.com:14100/oic_rest
/rest/jwtauthentication/authenticate
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"profileid1",
"X-Idaas-Rest-Subject-Password":"secret12",
"X-Idaas-Rest-New-Token-Type-To-Create":"CLIENTTOKEN"}'
-H "X-IDAAS-REST-VERSION:v1"
サンプル・レスポンス
HTTP/1.1 200 OK Date: Tue, 05 Jun 2012 11:23:19 GMT Transfer-Encoding: chunked Content-Type: application/json X-IDAAS-REST-VERSION: v1 Set-Cookie: JSESSIONID=5Z4sPNsHVmrplgs8HNDbQGxddC7TJQS7s4QspYvMpcMJJLC2nGx5!1574 236250; path=/; HttpOnly X-ORACLE-DMS-ECID:a393487d2600b00c:-7abb0b83:137b52ee014:-8000-00000000000026aa X-Powered-By: Servlet/2.5 JSP/2.1
サービス・ドメインの値の指定に使用します。サービス・ドメインの値が指定されていない場合、Defaultサービス・ドメインが使用されます。
-H "X-IDAAS-SERVICEDOMAIN: Default"
サンプル・リクエスト
curl -i
-H "Content-Type: application/json" --request POST
http://host.us.example.com:14100/oic_rest/rest/jwtauthentication/authenticate
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"profileid1",
"X-Idaas-Rest-Subject-Password":"secret12",
"X-Idaas-Rest-New-Token-Type-To-Create":"CLIENTTOKEN"}'
-H "X-IDAAS-REST-VERSION:v1"
-H "X-IDAAS-SERVICEDOMAIN: Default"
HTTPリクエスト・ヘッダー内でアプリケーションの資格証明の指定に使用します。
次の書式を使用します。
-H "X-IDAAS-REST-AUTHORIZATION: <AuthenticationScheme-Name> <Credential Value>"
ここで、AuthenticationScheme-Nameは次のいずれかです。
HTTP Basic
UIDPassword
Token
-H "X-IDAAS-REST-AUTHORIZATION: Token eyJhbG56I4OTg5OTk3M...fW1VGmunfzqZ-bG4rM" -H "X-IDAAS-REST-AUTHORIZATION: Basic fn49xkOVXunF%2B5zMQUiGUlwTXPYiKw" -H "X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred=\"Tp8aUEeptClBz6h9cH8F%2Fwk976\""
サンプル・リクエスト
curl -i -H "Content-Type: application/json" --request POST
http://host.us.example.com:14100/oic_rest/rest/jwtauthentication/authenticate
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"sampleuser",
"X-Idaas-Rest-Subject-Password":"password123",
"X-Idaas-Rest-New-Token-Type-To-Create":"USERTOKEN"}'
-H "X-IDAAS-REST-VERSION:v1"
-H "X-IDAAS-SERVICEDOMAIN: Default"
-H "X-IDAAS-REST-AUTHORIZATION: Token eyJhbGciOiJSUzUxMiIsInR5cSldUQXV0aGVudGljYXR
CI6IkpXVCIsImtpZCI6Im9yYWtleSJ9.eyJleHAiOjEzMzg4OTg5OTk3MzIsIzZXJ2ZXIxIiwiaXNzIjoi
joiY2I2MWU5YTQtZjJmYS00ZDQzLWFlOTYtZWQ5MjZlMGQ2NDZlIiwib3JhY2xlLm9pYy50b2tlbi50eXB
lIjoiQ0xJRU5UVE9LRU4iLCJpYXQiOjEzMzg4OTUzOTk3MzIsIm9yYWNsZS5vaWMudG9rZW4udXNlcl9kb
iI6InVpZD1wcm9maWxlaWQxLG91PXBlb3BsZSxvdT1teXJlYWxtLGRjPWJhc2VfZG9tYWsZSxvdT1teXJl
YWxtLGRjPWJhc2VfZG9tYWluIn0.kN17W0N3GEmdccm7GoUOT4iP23yWb6LloleOJ0grZkeiijXE-t8Kfy
N6Jq1m8EKzdYgiKFwdb-SO9MpOVMyPgxSRER9mn_3kkcKNagl7yIgu0EJUOS3Hudy2Suv0Th5b6fDgXLIY
LkBA0cC1WlP5RgW1VGmuBX7RnfzqZ-bG4rMiLCJwcm4iOiJwcm9maWxlaWQxIiwianRpI"
サービス・ドメイン構成の「サービス保護」タブの「ユーザー・プロファイル・サービス」または「認可サービス」で「セキュア・アプリケーション」オプションを選択する場合、クライアント・アプリケーションは、X-IDAAS-REST-AUTHORIZATIONヘッダーを使用してセキュリティ資格証明を送信する必要があります。サーバーは、3つの有効なセキュリティ・スキーム(HTTP Basic、UIDPasswordまたはトークン)のいずれかを使用して送信された資格証明を受け取ります。
HTTPリクエスト・ヘッダー内でユーザーの資格証明の指定に使用します。AUTHORIZATIONヘッダーは、JWTAuthenticationまたはOAMAuthenticationのいずれかのトークン形式を使用していてユーザー・トークンが必要な場合に使用します。ユーザー・トークンの値は、認証サービス・プロバイダによって発行されたユーザー・トークンとする必要があります。
次の書式を使用します。
-H "AUTHORIZATION:<User Token Value>"
-H "AUTHORIZATION:eyJhbGciOiJSUzUxMiIsInR5cmtpZCI6Im9g5OTk3M...sW1VGmunfzqZ-bG4rM"
サンプル・リクエスト
curl -i --request GET "http://host.us.example.com:14100/oic_rest/rest/userprofile/people/weblogic/" -H "AUTHORIZATION:eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6Im9yYWtleSJ9.eyJleHi EzMzg4OTk3MTMxMzcsImF1ZCI6Im9hbV9zZXJ2ZXIxIiwiaXNzIjoiSldUQXV0aGVudGljYXRpb24iLCJw cm4iOiJ3ZWJsb2dpYyIsImp0aSI6IjNlMjdiZjc4LTg3NDQtNDFkMS05MzlmLTlkZGY0N2VkNGFlNyIsIm YWNsZS5vaWMudG9rZW4udHlwZSI6IlVTRVJUT0tFTiIsImlhdCI6MTMzODg5NjExMzEzNywib3JhY2xlLm 9pYy50b2tlbi51c2VyX2RuIjoidWlkPXdlYmxvZ2ljLG91PXBlb3BsZSxvdT1teXJlYWxtLGRjPWJhc2V6 ZG9tYWluIn0.hHmAa5Syw3AcqRPwIq_XLx6DcMzCBzvDXGFYvwAf9nqVgxgvLTJJfxZzofS5Ut272b0dFG sv3qakeDm2NTgg6fR2YKH5BxAHnEmq0IAmhLuyWdux_rMZNB-wP8h5JD26UQf_nnBBWApvgULeM2mWQEzY RVDMpN9K7pycNrsGKOj8U"
サブジェクトのタイプ(USERCREDENTIAL、UID、UIDASSERTIONまたはTOKEN)
-d '{"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL"}'
-d '{"X-Idaas-Rest-Subject-Type":"UID"}'
-d '{"X-Idaas-Rest-Subject-Type":"UIDASSERTION"}'
サンプル・リクエスト1
curl -H "Content-Type: application/json" --request GET "http://host.us.example.com:14100/oic_rest/rest/jwtauthentication/validate? X-Idaas-Rest-Subject-Value=eyJhbGciOiJSUzU...I_A0PM& X-Idaas-Rest-Subject-Type=TOKEN"
サンプル・リクエスト2
curl -i -H "Content-Type: application/json" --request POST
http://host.us.example.com:14100/oic_rest/rest/jwtauthentication/authenticate
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"profileid1",
"X-Idaas-Rest-Subject-Password":"secret12345",
"X-Idaas-Rest-New-Token-Type-To-Create":"CLIENTTOKEN"}'
サブジェクトの文字列値。この属性は、X-Idaas-Rest-Subject-Typeの値がTOKEN、UIDまたはUIDASSERTIONの場合に追加します。
サンプル・リクエスト1
curl -H "Content-Type: application/json" --request GET "http://host.example.com:14100/oic_rest/rest/jwtauthentication/validate? X-Idaas-Rest-Subject-Value~=eyJhbGciOiJSUzU...PM& X-Idaas-Rest-Subject-Type~=TOKEN"
サンプル・リクエスト2
curl -H "Content-Type: application/json" --request POST
http://localhost:18001/oic_rest/rest/jwtauthentication/access
-d '{
"X-Idaas-Rest-Subject-Type":"TOKEN",
"X-Idaas-Rest-Subject-Value":"vTBI8jN...%3D",
"X-Idaas-Rest-Application-Context":"75sSbBZZKJiUOAWikZxsKA==",
"X-Idaas-Rest-Application-Resource":"http:/host.example.com:7779/index.html",
"X-Idaas-Rest-New-Token-Type-To-Create":"ACCESSTOKEN"}'
サブジェクト・タイプがTOKENの場合、ヘッダーにサブジェクト・タイプと文字列値の両方を指定するために使用します。
サンプル・リクエスト
curl -H "Content-Type: application/json" --request GET http://host.example.com:14100/oic_rest/rest/jwtauthentication/validate -H "X-Idaas-Rest-Subject: TOKEN eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6Im9yYWtl eSJ9.eyJleHAiOjEzMzg5MDEzMzUyMjUsImF1ZCI6Im9hbV9zZXJ2ZXIxIiwiaXNzIjoiSldUQXV0aGVu dGljYXRpb24iLCJwcm4iOiJ3ZWJsb2dpYyIsImp0aSI6ImUzNDZiYjJiLTQyZmYtNGRjMC1hOTZkLWYyY 2U5MjM0NTM0YSIsIm9yYWNsZS5vaWMudG9rZW4udHlwZSI6IlVTRVJUT0tFTiIsImlhdCI6MTMzODg5Nz czNTIyNSwib3JhY2xlLm9pYy50b2tlbi51c2VyX2RuIjoidWlkPXdlYmxvZ2ljLG91PXBlb3BsZSxvdT1 teXJlYWxtLGRjPWJhc2VfZG9tYWluIn0.GZ3-X4NRGdQ99MB63B5MmPuyE5M2kFwqHMQ97AXwBjYElMep ZdziTEgDeYLKJuVB83plSGwpfQEDdzlxR3Sy7tRXbfV3EdK1lpbUyUyEEIwAfuu4xtbNERKrPw3pJoPtU q0TCd0BV2sRdyy1zuSBdU2J6zUjG8rW-PYDWI_A0PM"
トークン交換に必要な追加の資格証明の指定に使用します。この場合、"X-Idaas-Rest-Subject-Type"はTOKENと指定する必要があります。
curl -H "Content-Type: application/json" --request POST
http://localhost:18001/oic_rest/rest/jwtauthentication/access
-d '{"X-Idaas-Rest-Subject-Type":"TOKEN",
"X-Idaas-Rest-Subject-CREDENTIAL":"12345",...}'
サンプル・リクエスト
curl -H "Content-Type: application/json" --request POST
http://host.example.com:14100/oic_rest/rest/jwtoamauthentication/authenticate
-d
'{"X-Idaas-Rest-New-Token-Type-To-Create":["USERTOKEN::OAMUT","USERTOKEN::OAMMT"],
"X-Idaas-Rest-Subject-Value":"JWT-Token-Value",
"X-Idaas-Rest-Subject-Type":"TOKEN",
"X-Idaas-Rest-Subject-CREDENTIAL":"12345"}'
X-Idaas-Rest-Subject-Typeの値がUSERCREDENTIALの場合のみ、文字列としてユーザー名を指定するために使用します。
サンプル・リクエスト
curl -i -H "Content-Type: application/json" --request POST
http://host.example.com:14100/oic_rest/rest/jwtauthentication/authenticate
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"sampleuser",
"X-Idaas-Rest-Subject-Password":"password123",
"X-Idaas-Rest-New-Token-Type-To-Create":"USERTOKEN"}'
X-Idaas-Rest-Subject-Typeの値がUSERCREDENTIALの場合のみ、文字列としてパスワードを指定するために使用します。
サンプル・リクエスト
curl -i -H "Content-Type: application/json" --request POST
http://host.example.com:14100/oic_rest/rest/jwtauthentication/authenticate
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"sampleuser",
"X-Idaas-Rest-Subject-Password":"password123",
"X-Idaas-Rest-New-Token-Type-To-Create":"USERTOKEN"}'
作成するトークン・タイプを指定するために使用します。1つのリクエストで複数のトークン・タイプを指定できます。
サンプル・リクエスト
curl -i -H "Content-Type: application/json" --request POST
http://host.example.com:14100/oic_rest/rest/jwtauthentication/authenticate
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"sampleuser",
"X-Idaas-Rest-Subject-Password":"password123",
"X-Idaas-Rest-New-Token-Type-To-Create":"USERTOKEN"}'
アクセス・トークンが必要なアプリケーション・コンテキストを指定するために使用します。指定する値は文字列とする必要があります。
サンプル・リクエスト1
curl -H "Content-Type: application/json"
--request POST http://localhost:18001/oic_rest/rest/jwtauthentication/access
-d '{
"X-Idaas-Rest-Subject-Type":"TOKEN",
"X-Idaas-Rest-Subject-Value":"vTBI8jN8eYIsfAp%2BZqe...Gk5A%3D%3D",
"X-Idaas-Rest-Application-Context":"75sSbBZZKJiUOAWikZxsKA==",
"X-Idaas-Rest-Application-Resource":"http://h5.example.com:7779/index.html",
"X-Idaas-Rest-New-Token-Type-To-Create":"ACCESSTOKEN"}'
アクセス・トークンが必要なターゲット・リソースを指定するために使用します。指定する値は文字列とする必要があります。
サンプル・リクエスト1
curl -H "Content-Type: application/json"
--request POST http://localhost:18001/oic_rest/rest/jwtauthentication/access
-d '{
"X-Idaas-Rest-Subject-Type":"TOKEN",
"X-Idaas-Rest-Subject-Value":"vTBI8jN8eYIsfAp%2BZqe...5XFSQk5A%3D%3D",
"X-Idaas-Rest-Application-Context":"75sSbBZZKJiUOAWikZxsKA==",
"X-Idaas-Rest-Application-Resource":"http://h5.example.com:7779/index.html",
"X-Idaas-Rest-New-Token-Type-To-Create":"ACCESSTOKEN"}'
プリンシパル・ユーザーを返すために使用します。
サンプル・レスポンス
HTTP/1.1 200 OK Date: Tue, 05 Jun 2012 11:35:13 GMT
Transfer-Encoding: Content-Type: application/json X-IDAAS-REST-VERSION: v1
Set-Cookie: JSESSIONID=
TCjjPNnRvL6fvhJpMSjLhHYrFyMKqwcFxTNL1RQzyvkSJ7G2TLj4!1574236250;
path=/; HttpOnly X-ORACLE-DMS-ECID: a393487d2600b00c:-7abb0b83:137b52ee014:
-8000-00000000000026f5 X-Powered-By: Servlet/2.5 JSP/2.1
{
"X-Idaas-Rest-Token-Value":"eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6Im9yYWtle
SJ9.eyJleHAiOjEzMzg4OTk3MTMxMzcsImF1ZCI6Im9hbV9zZXJ2ZXIxIiwiaXNzIjoiSldUQXV0aGVud
GljYXRpb24iLCJwcm4iOiJ3ZWJsb2dpYyIsImp0aSI6IjNlMjdiZjc4LTg3NDQtNDFkMS05MzlmLTlkZG
d0N2VkNGFlNyIsIm9yYWNsZS5vaWMudG9rZW4udHlwZSI6IlVTRVJUT0tFTiIsImlhdCI6MTMzODg5NjE
xMzEzNywib3JhY2xlLm9pYy50b2tlbi51c2VyX2RuIjoidWlkPXdlYmxvZ2ljLG91PXBlb3BsZSxvdT1t
eXJlYWxtLGRjPWJhc2VfZG9tYWluIn0.hHmAa5Syw3AcqRPwIqXLx6DcMzCBzvDXGFYvwAf9nqVgxgvLT
JfxZzofS5Ut272b0dFGsv3qakeDm2NTgg6fR2YKH5BxAHnEmq0IAmhLuyWdux_rMZNB-wP8h5JD26UQf
nnBBWApvgULeM2mWQEzYRVDMpN9K7pycNrsGK8U",
"X-Idaas-Rest-User-Principal":"jdoe",
"X-Idaas-Rest-Provider-Type":"JWT",
"X-Idaas-Rest-Token-Type":"USERTOKEN"
}
トークン・プロバイダのタイプを返すために使用します。有効な値は、OAM_10G、OAM_11GおよびJWTです。
サンプル・レスポンス
HTTP/1.1 200 OK Date: Tue, 05 Jun 2012 11:35:13 GMT
Transfer-Encoding: chunked Content-Type: application/json X-IDAAS-REST-VERSION: v1
Set-Cookie:JSESSIONID=TCjjPNnRvL6fvhJpMSjLhHYrFyMKqwcFxTNL1RQzyvkSJ7G2TLj4!157423;
path=/; HttpOnly X-ORACLE-DMS-ECID:
a393487d2600b00c:-7abb0b83:137b52ee014:-8000-00000000000026f5
X-Powered-By: Servlet/2.5 JSP/2.1
{
"X-Idaas-Rest-Token-Value":"eyJhbGciOiJSUzUxMiIsInR
5cCI6IkpXVCIsImtpZCI6Im9yYWtleSJ9.eyJleHAiOjEzMzg4OTk3MTMxMzcsImF1ZCI6Im9hbV9
zZXJ2ZXIxIiwiaXNzIjoiSldUQXV0aGVudGljYXRpb24iLCJwcm4iOiJ3ZWJsb2dpYyIsImp0aSI6IjN
lMjdiZjc4LTg3NDQtNDFkMS05MzlmLTlkZGY0N2VkNGFlNyIsIm9yYWNsZS5vaWMudG9rZW4
udHlwZSI6IlVTRVJUT0tFTiIsImlhdCI6MTMzODg5NjExMzEzNywib3JhY2xlLm9pYy50b2tlbi51c2
VyX2RuIjoidWlkPXdlYmxvZ2ljLG91PXBlb3BsZSxvdT1teXJlYWxtLGRjPWJhc2VfZG9tYWluIn0.h
HmAa5Syw3AcqRPwIq_XLx6DcMzCBzvDXGFYvwAf9nqVgxgvLTJJfxZzofS5Ut272b0dFGsv3q
akeDm2NTgg6fR2YKH5BxAHnEmq0IAmhLuyWdux_rMZNB-wP8h5JD26UQf_nnBBWApvgULeM
2mWQEzYRVDMpN9K7pycNrsGK8U",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Provider-Type":"JWT",
"X-Idaas-Rest-Token-Type":"USERTOKEN"
}
この項の認可スキームは、Mobile and SocialのRESTサービスの保護に使用されます。
次のコールについて説明します。
UIDPASSWORD認証に必要なRESTコールの送信方法を示します。
curl --request GET "localhost:18001/idaas_rest/rest/authorizationservice3/authorization? resource=http://is-x86-05.us.example.com:7779/index.html& action=GET&X-Idaas-Rest-Subject-Value= ZNsJcMMM3ow83Zr5D8KqCPnhBGmui4RnBvUXJ5dqC7OfwZIv6FDcYWwfPuHupxN%2B fs5qN0I6AWIZBX%2F2KQNNQ5bPDN1XqeE8y7OPPoy4znteEfCaRHb7UA1ia1ox%2BW8 5LbknXCLaZ5q%2FN4I0IcXP%2B13FGX9r9LROQ3OZZVNMLhfx3KabZcIVmSHBkK%2F ARGYEJQv6RO%2FPCMN2YYTJgWxGr20rWeG8NLbzgN%2FPyADxxlPLvkxH2YCVHHH 7bLBfOp3p83IbJ%2FC%2Bm9sCd4YjlSlhsMUXKtvZ1LnJME4UymuR5tXuw2B0Yr25OHxU bMreIGgRYZXFonmjhAovKhXqIgzpIg%3D%3D& X-Idaas-Rest-Subject-Type=TOKEN" -H "X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred=\" Tp8aUEeptClBz6A6h9cH8F%2FwcZJvLok976\"" -H "Authorization: gdX4z0leySgt0DiPeItsQfBweYZIfZ2dm7fVypNz%2Bf6pbrzF7P4 AvUzPXIzLf2lL0zHuvNI%2B77OsUESM99U6zQjytC%2FgrAD6O2QdSe2VUNGjjw8Di5ev1 gSI0m5a5VQO9rmGNlB1xndnPYoaX0nDpi3eGAyQNw3PUAbEGYglsDMR1js2jsiXKyexryn 8k1coc3EHGqk%2ByqfEXzfzGjwEB4ipnSGg2c4a9BX2BKjKLoOD0PdNVc2nf6f%2F7T2Ck hA%2BSFowwE%2BEIzvQ7cVbeRYqco2eYCJhs8GS8Haq9T2dnhIAa4tux9MyxVLRNRtDd q39HDr5hvUI7OpHQHNUMeRcPQ%3D%3D"
リクエストにおいて、サービス・ドメインの値の指定には、X-IDAAS-SERVICEDOMAINヘッダー名を使用します。X-IDAAS-SERVICEDOMAIN名は、問合せパラメータまたはヘッダーとして使用できます。サービス・ドメインの値が指定されていない場合、Defaultサービス・ドメインが使用されます。
HTTP Basic認可に必要なRESTコールの送信方法を示します。
curl --request GET "localhost:18001/idaas_rest/rest/authorizationservice3/authorization? resource=http://is-x86-05.us.example.com:7779/index.html &action=GET& X-Idaas-Rest-Subject-Value= ZNsJcMMM3ow83Zr5D8KqCPnhBGmui4RnBvUXJ5dqC7OfwZIv6FDcYWwfPuHupxN%2Bfs5 qN0I6AWIZBX%2F2KQNNQ5bPDN1XqeE8y7OPPoy4znteEfCaRHb7UA1ia1ox%2BW85Lbkn XCLaZ5q%2FN4I0IcXP%2B13FGX9r9LROQ3OZZVNMLhfx3KabZcIVmSHBkK%2FARGYEJ Qv6RO%2FPCMN2YYTJgWxGr20rWeG8NLbzgN%2FPyADxxlPLvkxH2YCVHHH7bLBfOp3p 83IbJ%2FC%2Bm9sCd4YjlSlhsMUXKtvZ1LnJME4UymuR5tXuw2B0Yr25OHxUbMreIGgRYZ XFonmjhAovKhXqIgzpIg%3D%3D& X-Idaas-Rest-Subject-Type=TOKEN" -H "X-IDAAS-REST-AUTHORIZATION: Basic Tp8aUEeptClBz6A6h9cH8F%2FwcZJvLok976" -H "Authorization: TOKEN gdX4z0leySgt0DiPeItsQfBweYZIfZ2dm7fVypNz%2Bf6pbrzF7P4A vUzPXIzLf2lL0zHuvNI%2B77OsUESM99U6zQjytC%2FgrAD6O2QdSe2VUNGjjw8Di5ev1gS I0m5a5VQO9rmGNlB1xndnPYoaX0nDpi3eGAyQNw3PUAbEGYglsDMR1js2jsiXKyexryn8k1 coc3EHGqk%2ByqfEXzfzGjwEB4ipnSGg2c4a9BX2BKjKLoOD0PdNVc2nf6f%2F7T2CkhA%2B SFowwE%2BEIzvQ7cVbeRYqco2eYCJhs8GS8Haq9T2dnhIAa4tux9MyxVLRNRtDdq39HDr5hv UI7OpHQHNUMeRcPQ%3D%3D"
サービス・ドメイン名は、X-IDAAS-SERVICEDOMAINを使用して、問合せパラメータまたはヘッダーとして指定できます。指定されない場合、Mobile and Socialによってデフォルトのサービス・ドメインとみなされます。
HTTPBasicは、ここで示すように、クライアント定義に暗号化パスワードのあるクライアントに対して構成する必要があります。
<IdaasClient description="OIC Client 1" name="clientid1">
<authnService>sampletokenservice</authnService>
<param>
<name>userId4BasicAuth</name>
<value>rest_client1</value>
</param>
<param>
<name>sharedSecret4BasicAuth</name>
<value>9Qo9olLIl5gDwESYR0hOgw==</value>
</param>
</IdaasClient>
Access Manager認可に必要なRESTコールの送信方法を示します。
curl --request GET "localhost:18001/idaas_rest/rest/authorizationservice3/authorization? resource=http://is-x86-05.us.example.com:7779/index.html &action=GET& X-Idaas-Rest-Subject-Value=ZNsJcMMM3ow83Zr5D8KqCPnhBGmui4RnBvUXJ5dqC7OfwZIv6 FDcYWwfPuHupxN%2Bfs5qN0I6AWIZBX%2F2KQNNQ5bPDN1XqeE8y7OPPoy4znteEfCaRHb 7UA1ia1ox%2BW85LbknXCLaZ5q%2FN4I0IcXP%2B13FGX9r9LROQ3OZZVNMLhfx3KabZcIV mSHBkK%2FARGYEJQv6RO%2FPCMN2YYTJgWxGr20rWeG8NLbzgN%2FPyADxxlPLvkxH2 YCVHHH7bLBfOp3p83IbJ%2FC%2Bm9sCd4YjlSlhsMUXKtvZ1LnJME4UymuR5tXuw2B0Yr25 OHxUbMreIGgRYZXFonmjhAovKhXqIgzpIg%3D%3D &X-Idaas-Rest-Subject-Type=TOKEN" -H "X-IDAAS-REST-AUTHORIZATION: TOKEN Tp8aUEeptClBz6A6h9cH8F%2FwcZJvLok976 c5q0SitrrgSCJ5FQk58KMtUg2FCPLbjZbP2%2B3P5zZPiSCeHwNua%2FBHdIDCOnUYOXNg 4uBKA7t7O4jGRfn49xkOVXunF%2B5zMQUiGUlwTXPYiKwooAknkeHs3HIq6s2if%2FHpuPH curRa%2BdyfjWfYWTpqPeo%2FzyHHzDH1wF8hM6k6YwJ%2FpxD8avuXogP%2Bp5j2tCZ0 aAhonseNMcKvGTRBoV1shGnotK9gt01nDgc2LWA5oidJgxlcaWDw3%2FXZhvgudkLwl0jxEw 0K%2BzffyeZs0gfUkZJBnsm8qh2KP%2BiCPzT7HPVPF%2FyYCg%3D%3D" -H "Authorization: TOKEN gdX4z0leySgt0DiPeItsQfBweYZIfZ2dm7fVypNz%2Bf6pbrzF7P4AvU zPXIzLf2lL0zHuvNI%2B77OsUESM99U6zQjytC%2FgrAD6O2QdSe2VUNGjjw8Di5ev1gSI0m5 a5VQO9rmGNlB1xndnPYoaX0nDpi3eGAyQNw3PUAbEGYglsDMR1js2jsiXKyexryn8k1coc3EH Gqk%2ByqfEXzfzGjwEB4ipnSGg2c4a9BX2BKjKLoOD0PdNVc2nf6f%2F7T2CkhA%2BSFowwE %2BEIzvQ7cVbeRYqco2eYCJhs8GS8Haq9T2dnhIAa4tux9MyxVLRNRtDdq39HDr5hvUI7OpHQ HNUMeRcPQ%3D%3D"
サービス・ドメイン名は、X-IDAAS-SERVICEDOMAINを使用して、問合せパラメータまたはヘッダーとして指定できます。指定されない場合、Mobile and Socialによってデフォルトのサービス・ドメインとみなされます。
問合せパラメータのトークン値はURLエンコードされているのに対して、ヘッダーの同じ値はURLエンコードされていないことに注意してください。
アプリケーション・プロファイルは、他の認証サービスに適用できない一意の名前で定義する必要があります。次に例を示します。
<ApplicationProfile description="OIC Client 5" name="profileid3"> </ApplicationProfile>
この項のcURLコマンドは、Mobile and Socialサーバーからセキュリティ・トークンをリクエストするために使用するRESTコールを示します。一部のRESTコールはPOSTメソッドを使用しますが、その他はGETを使用します。
次のコールについて説明します。
次のコールはJWT-OAM認証サービス・プロバイダで使用される場合に有効です。
クライアント・トークンをリクエストするRESTコールを送信する方法を示します。
curl -H "Content-Type: application/json" --request POST
http://localhost:18001/idaas_rest/rest/tokenservice1/tokens
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"client1",
"X-Idaas-Rest-Subject-Password":"secret12",
"X-Idaas-Rest-New-Token-Type-To-Create":"CLIENTTOKEN"}'
{"X-Idaas-Rest-Token-Value":"kubExOtDjCtL5Q0R1QhAgL5zNVmDFYKG1Y0AUe+P9HKvnz4gIDVx
YIMNxxyfJJpmkT5XtYKkDgW295juWEcK7c7LmPBkxE6MytcfvKh4HzWIUGEgS2uKej3PQJG49RpZ6UxAP
ZbGYWj7fpjZoqBhtPiCtyacI0C22bl2/DbbRCVx4341z68j5YiTgOklGC6lIucSorlM7pBI54bxygFZsr
F1DVKxL+RNhrobYsN6I7fFLR4fL+iO/BZcbwM/4SNDuCIC82eOxPI/mTcRraz0cLw9tcLbw7c11MjC2eu
EBSGUjGcNmxpbhiJIt7SIBzJczzNsaBnH+2fKx/VTeVVvGQgGAf19e5b1Drj5QyNhj2I=",
"X-Idaas-Rest-Token-Type":"CLIENTTOKEN",
"X-Idaas-Rest-User-Principal":"client-1",
"X-Idaas-Rest-Provider-Type":"OAM_11G"}
サービス・ドメイン名は、X-IDAAS-SERVICEDOMAINを使用して、問合せパラメータまたはヘッダーとして指定できます。指定されない場合、Mobile and Socialによってデフォルトのサービス・ドメインとみなされます。
ユーザー・トークンをリクエストするRESTコールを送信する方法を示します。
curl -H "Content-Type: application/json"
--request POST http://localhost:18001/idaas_rest/rest/tokenservice1/tokens
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"tester1",
"X-Idaas-Rest-Subject-Password":"secret12",
"X-Idaas-Rest-New-Token-Type-To-Create":"USERTOKEN"}'
{"X-Idaas-Rest-Token-Value":"adc3bfbExOtDjCtL5Q0R1QhAgL5zNVmDFYKG1Y0AUe+P9HKvnz4g
IDVxYIMNxxyfJJpmkT5XtYKkDgW295juWEcK7c7LmPBkxE6MytcfvKh4HzWIUGEgS2uKej3PQJG49RpZ6
UxAPZbGYWj7fpjZoqBhtPiCtyacI0C22bl2/DbbRCVx4341z68j5YiTgOklGC6lIucSorlM7pBI54bxyg
FZsrF1DVKxL+RNhrobYsN6I7fFLR4fL+iO/BZcbwM/4SNDuCIC82eOxPI/mTcRraz0cLw9tcLbw7c11Mj
C2euEBSGUjGcNmxpbhiJIt7SIBzJczzNsaBnH+2fKx/VTeVVvGQgGAf19e5b1Drj5QyNhj2I=",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
"X-Idaas-Rest-User-Principal":"user-1",
"X-Idaas-Rest-Provider-Type":"OAM_11G"}
サービス・ドメイン名は、X-IDAAS-SERVICEDOMAINを使用して、問合せパラメータまたはヘッダーとして指定できます。指定されない場合、Mobile and Socialによってデフォルトのサービス・ドメインとみなされます。
アクセス・トークンをリクエストするRESTコールを送信する方法を示します。
curl -H "Content-Type: application/json"
--request POST http://localhost:18001/idaas_rest/rest/tokenservice1/tokens
-d '{
"X-Idaas-Rest-Subject-Type":"TOKEN",
"X-Idaas-Rest-Subject-Value":"vTBI8jN8eYsmHCU..5XFSQA%3D%3D",
"X-Idaas-Rest-Application-Context":"75sSbBZZKJiUOAWikZxsKA==",
"X-Idaas-Rest-Application-Resource":"http:/wgte2.example.com:779/index.html",
"X-Idaas-Rest-New-Token-Type-To-Create":"ACCESSTOKEN"}'
{"X-Idaas-Rest-Token-Value":"R1QhAgL5zNVmDFYKG1Y0AUe+P9HKvnz4gIDVxYIMNxxyfJJpmkT5
XtYKkDgW295juWEcK7c7LmPBkxE6MytcfvKh4HzWIUGEgS2uKej3PQJG49RpZ6UxAPZbGYWj7fpjZoqBh
tPiCtyacI0C22bl2/DbbRCVx4341z68j5YiTgOklGC6lIucSorlM7pBI54bxygFZsrF1DVKxL+RNhrobY
sN6I7fFLR4fL+iO/BZcbwM/4SNDuCIC82eOxPI/mTcRraz0cLw9tcLbw7c11MjC2euEBSGUjGcNmxpbhi
JIt7SIBzJczzNsaBnH+2fKx/VTeVVvGQgGAf19e5b1Drj5QyNhj2I=",
"X-Idaas-Rest-Token-Type":"ACCESSTOKEN",
"X-Idaas-Rest-User-Principal":"user-1",
"X-Idaas-Rest-Provider-Type":"OAM_11G"}
サービス・ドメイン名は、X-IDAAS-SERVICEDOMAINを使用して、問合せパラメータまたはヘッダーとして指定できます。指定されない場合、Mobile and Socialによってデフォルトのサービス・ドメインとみなされます。
複数のトークン(ユーザー・トークンとマスター・トークンなど)をリクエストするRESTコールを送信する方法を示します。
curl -i -H
"Content-Type: application/json"
--request POST http://host12.example.com:1801/idaas_rest/rest/jwtauthentication/authenticate
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"testuser",
"X-Idaas-Rest-Subject-Password":"userpassword",
"X-Idaas-Rest-New-Token-Type-To-Create":["USERTOKEN","USERTOKEN::OAMMT"]}'
{"TokensList":
[
{
"X-Idaas-Rest-Token-Value":"eyJhbGciOiJSUzx...GbC7cswpZN1ep8up3E34",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
"X-Idaas-Rest-User-Principal":"testuser",
"X-Idaas-Rest-Provider-Type":"JWT",
"handles":
{"DebugDummyHandleName1":
{"expirationTSInSec":1332192041,"value":"DebugDummyHandleValue1"}
}
},
{"X-Idaas-Rest-Token-Type":"USERTOKEN::OAMMT"}
]
}
X-Idaas-Rest-New-Token-Type-To-Createパラメータを使用してMobile and Socialのトークン・タイプを指定できます。次のいずれかを指定する必要があります。
CLIENTTOKEN
USERTOKEN
ACCESSTOKEN
USERTOKEN::OAMMT
認証サービス・プロバイダがマスター・トークンを発行できる場合、クライアントはユーザー・トークンとマスター・トークンの2つのトークンを取得します。
クライアント・トークンをリクエスト(取得)するために必要なRESTコールを送信する方法を示します。
curl
--request GET http://localhost:18001/idaas_rest/rest/mobilesecret1/tokens/info
-H "X-Idaas-Rest-Subject: TOKEN someTokenValue"
{"X-Idaas-Rest-Token-Value":"QA8wjxWGSf3VMggfxFFYW4Yrre0DuG7hOagET4yfF3PX
bbUUsgh7uJUOEX5aZAQPsrV90J20gtALfhiUI32gbxooeqppGnQSLnk0ehpN4%2B6%2BCgR2nOMrYzoLi
U7%2FvrnoG7894eUfxHwmvZESQw4w4ez6L%2BOcaHF2tc05F4zkqi6%2BveSL4uFdiaMh9pJ2k%2BXF%2
FWn2Q8IfOWBdk2IzWeFhwi35CzMLJrNiAST%2BdMWhteIKcNEFbvS1WFaYR8Fjzx%2FpuU3%2FdTaG2gX
xDJxE%2BpI2bpanks4fdZwaFmkLCraUfJFdtiGgOk2SIVIwi4UYCBAbM9XZJ5nyjtmxpqEESKJSGQ%3D%
3D",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
"X-Idaas-Rest-User-Principal":"testuser",
"X-Idaas-Rest-Provider-Type":"JWT"
}
サービス・ドメイン名は、X-IDAAS-SERVICEDOMAINを使用して、問合せパラメータまたはヘッダーとして指定できます。指定されない場合、Mobile and Socialによってデフォルトのサービス・ドメインとみなされます。
問合せパラメータのトークン値はURLエンコードされているのに対して、ヘッダーの同じ値はURLエンコードされていないことに注意してください。
トークンを削除するために必要なRESTコールを送信する方法を示します。
サンプル・リクエスト1
curl -H "Content-Type:application/json"
--request DELETE
http://localhost:18001/oic_rest/rest/jwtauthentication/tokens/info
-d '{
"X-Idaas-Rest-Subject-Value":"YHEGjRP5eewNeXeK9v%2F3YBX...tvMJW9p%3D",
"X-Idaas-Rest-Subject-Type":"TOKEN"}'
サンプル・リクエスト2
curl -H "Content-Type: application/json"
--request DELETE
http://localhost:14100/oic_rest/rest/oamauthentication/tokens
-d '{
"X-Idaas-Rest-Subject-Value":"jdoe",
"X-Idaas-Rest-Subject-Type":"UID"}'
-H "Authorization: 01wIWzki0cF0Z...6hwVYV4fZ2CAMSXZHKPKD8="
X-Idaas-Rest-Subject-Typeを使用してTOKENまたはUIDのいずれかを指定できます。X-Idaas-Rest-Subject-Valueを使用してトークン値またはUID値のいずれかを指定します。
サブジェクト・タイプがTOKENの場合に単一のトークンを削除するには、サービス・エンドポイント~/tokens/infoまたは~/deleteのいずれかを使用します。
サブジェクト・タイプがTOKENの場合にトークン所有者に属しているすべてのトークンを削除するには、サービス・エンドポイント~/tokensを使用します。リクエストを検証するには-H "AUTHORIZATION User Token Value"ヘッダーを使用します。
サブジェクト・タイプがUIDの場合、UIDに属しているすべてのトークンを削除するには、サービス・エンドポイント~/tokensを使用します。リクエストを検証するには-H "AUTHORIZATION User Token Value"ヘッダーを使用します。
サービス・ドメイン名は、X-IDAAS-SERVICEDOMAINを使用して、問合せパラメータまたはヘッダーとして指定できます。指定されない場合、Mobile and Socialによってデフォルトのサービス・ドメインとみなされます。
問合せパラメータのトークン値はURLエンコードされているのに対して、ヘッダーの同じ値はURLエンコードされていないことに注意してください。
クライアント・トークンをリクエストするために必要なRESTコールを送信する方法を示します。
curl --request GET "localhost:18001/idaas_rest/ rest/authorizationservice1/authorization? resource=http://webgate123.us.example.com:7779/index.html& action=GET&X-Idaas-Rest-Subject-Value= ZNsJcMMM3ow83Zr5D8KqCPnhBGmui4RnBvUXJ5dqC7OfwZIv6FDcYWwf PuHupxN%2Bfs5qN0I6AWIZBX%2F2KQNNQ5bPDN1XqeE8y7OPPoy4znte EfCaRHb7UA1ia1ox%2BW85LbknXCLaZ5q%2FN4I0IcXP%2B13FGX9r9LR OQ3OZZVNMLhfx3KabZcIVmSHBkK%2FARGYEJQv6RO%2FPCMN2YYTJ gWxGr20rWeG8NLbzgN%2FPyADxxlPLvkxH2YCVHHH7bLBfOp3p83IbJ%2 FC%2Bm9sCd4YjlSlhsMUXKtvZ1LnJME4UymuR5tXuw2B0Yr25OHxUbMreI GgRYZXFonmjhAovKhXqIgzpIg%3D%3D& X-Idaas-Rest-Subject-Type=TOKEN"
サービス・ドメイン名は、X-IDAAS-SERVICEDOMAINを使用して、問合せパラメータまたはヘッダーとして指定できます。指定されない場合、Mobile and Socialによってデフォルトのサービス・ドメインとみなされます。
問合せパラメータのトークン値はURLエンコードされているのに対して、ヘッダーの同じ値はURLエンコードされていないことに注意してください。
次のコールはJWT-OAM認証サービス・プロバイダで使用される場合に有効です。
curl -H "Content-Type: application/json"
--request POST http://host:port/oic_rest/rest/jwtoamauthentication/authenticate
-d '{
"X-Idaas-Rest-New-Token-Type-To-Create":"USERTOKEN",
"X-Idaas-Rest-Subject-Password":"password555",
"X-Idaas-Rest-Subject-Username":"webuser1234",
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL"}'
次のコールはJWT-OAM認証サービス・プロバイダで使用される場合に有効です。
JWT-OAM認証サービス・プロバイダ
curl -H "Content-Type: application/json"
--request POST http://host:port/oic_rest/rest/jwtoamauthentication/authenticate
-d '{
"X-Idaas-Rest-New-Token-Type-To-Create":["USERTOKEN","USERTOKEN::OAMMT",
"USERTOKEN::OAMUT"],
"X-Idaas-Rest-Subject-Password":"password555",
"X-Idaas-Rest-Subject-Username":"webuser1234",
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL"}'
モバイルJWT-OAM認証サービス・プロバイダ
curl -H "Content-Type: application/json"
--request
POST http://host:port/oic_rest/rest/mobilejwtoamauthentication/authenticate
-H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain'
-H 'X-Idaas-Rest-Authorization: UIDPASSWORD cred="T0lDU1NPQ...WZHQ0RnPQ=="'
-d '{
"X-Idaas-Rest-New-Token-Type-To-Create":["USERTOKEN","USERTOKEN::OAMUT",
"USERTOKEN::OAMMT"],
"X-Idaas-Rest-Subject-Password":"password555",
"deviceProfile":
{
"oracle:idm:claims:client:sdkversion":"11.1.2.0.0",
"hardwareIds":
{
"oracle:idm:claims:client:udid":"0e83ff56a12a9cf0c7",
"oracle:idm:claims:client:phonenumber":"1-650-555-1234",
"oracle:idm:claims:client:macaddress":"00-16-41-34-2C-A6",
"oracle:idm:claims:client:imei":"010113006310121"
},
"oracle:idm:claims:client:jailbroken":false,
"oracle:idm:claims:client:geolocation":"+40.689060,-74.044636",
"oracle:idm:claims:client:networktype":"PHONE_CARRIER",
"oracle:idm:claims:client:vpnenabled":false,
"oracle:idm:claims:client:ostype":"iPhone OS",
"oracle:idm:claims:client:phonecarriername":"AT&T",
"oracle:idm:claims:client:locale":"EN-US",
"oracle:idm:claims:client:osversion":"4.0"
},
"X-Idaas-Rest-Subject-Username":"weblogic",
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL"}'
JWT-OAM認証サービス・プロバイダ
{
"TokensList":[
{
"X-Idaas-Rest-Token-Value":"eyJhbGciOiJSUz...FfxrkN9xM",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
"X-Idaas-Rest-Provider-Type":"JWT"
},
{
"X-Idaas-Rest-Token-Value":"cL9fR2ASSB...iTaNs8c=",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN::OAMMT",
"X-Idaas-Rest-Provider-Type":"OAM_11G"
},
{
"X-Idaas-Rest-Token-Value":"VERSION_4%7EAn29pwsWv...ZMwLw%3D%3D",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN::OAMUT",
"X-Idaas-Rest-Provider-Type":"OAM_11G"
}]
}
モバイルJWT OAM認証サービス・プロバイダ
{
"TokensList":[
{
"X-Idaas-Rest-Token-Value":"eyJhbGciOiJ...lxizU",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
"X-Idaas-Rest-Provider-Type":"JWT"
},
{
"X-Idaas-Rest-Token-Value":"0fY4apw0Cfw...+edij0M=",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN::OAMUT",
"X-Idaas-Rest-Provider-Type":"OAM_11G"
},
{
"X-Idaas-Rest-Token-Value":"VERSION_4%7EBSTnEU5eDhsK%2FS%...mt5j4w%3D%3D",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN::OAMMT",
"X-Idaas-Rest-Provider-Type":"OAM_11G"
}]
}
次のコールはJWT-OAM認証サービス・プロバイダで使用される場合に有効です。
ここでのトークン交換の入力はJWTユーザー・トークンであり、トークン交換の出力はOAMユーザー・トークンおよびOAMマスター・トークンです。
JWT-OAM認証サービス・プロバイダ
curl -H "Content-Type: application/json"
--request POST http://host:port/oic_rest/rest/jwtoamauthentication/authenticate
-d '{
"X-Idaas-Rest-New-Token-Type-To-Create":["USERTOKEN","USERTOKEN::JWTUT"],
"X-Idaas-Rest-Subject-Value":"<JWT USER TOKEN>",
"X-Idaas-Rest-Subject-Type":"TOKEN"}'
モバイルJWT-OAM認証サービス・プロバイダ
curl -H "Content-Type: application/json"
--request POST http://host:port/oic_rest/rest/mobilejwtoamauthentication/authenticate
-H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain'
-H 'X-Idaas-Rest-Authorization: UIDPASSWORD cred="<BASE 64 Encoding Client ID : CRH>"'
-d '{
"X-Idaas-Rest-New-Token-Type-To-Create":["USERTOKEN","USERTOKEN::OAMUT",
"USERTOKEN::OAMMT"],
"deviceProfile":
{
"oracle:idm:claims:client:sdkversion":"11.1.2.0.0",
"hardwareIds":
{
"oracle:idm:claims:client:udid":"0e83ff56a12a9cf0c7",
"oracle:idm:claims:client:phonenumber":"1-650-555-1234",
"oracle:idm:claims:client:macaddress":"00-16-41-34-2C-A6",
"oracle:idm:claims:client:imei":"010113006310121"
},
"oracle:idm:claims:client:jailbroken":false,
"oracle:idm:claims:client:geolocation":"+40.689060,-74.044636",
"oracle:idm:claims:client:networktype":"PHONE_CARRIER",
"oracle:idm:claims:client:vpnenabled":false,
"oracle:idm:claims:client:ostype":"iPhone OS",
"oracle:idm:claims:client:phonecarriername":"AT&T",
"oracle:idm:claims:client:locale":"EN-US",
"oracle:idm:claims:client:osversion":"4.0"
},
"X-Idaas-Rest-Subject-Value":"<JWT USERTOKEN>",
"X-Idaas-Rest-Subject-Type":"TOKEN"}'
JWT-OAM認証サービス・プロバイダ
{
"TokensList":[
{
"X-Idaas-Rest-Token-Value":"eyJhbGciOiJSU...o6JOao3s",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
"X-Idaas-Rest-Provider-Type":"JWT"
},
{
"X-Idaas-Rest-Token-Value":"ipZ45ey55BAkb...G0tuDGyfdY=",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN::OAMUT",
"X-Idaas-Rest-Provider-Type":"OAM_11G"
},
{
"X-Idaas-Rest-Token-Value":"VERSION_4%7ESTFLB3gGSZrdy6...2SbdLQ%3D%3D",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN::OAMMT",
"X-Idaas-Rest-Provider-Type":"OAM_11G"
}]
}
モバイルJWT OAM認証サービス・プロバイダ
{
"TokensList":[
{
"X-Idaas-Rest-Token-Value":"eyJhbGciOiJ...-mVLKLtpONChYs",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
"X-Idaas-Rest-Provider-Type":"JWT"
},
{
"X-Idaas-Rest-Token-Value":"BsL1V2s...nbGXUF4nPfHFPqs=",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN::OAMUT",
"X-Idaas-Rest-Provider-Type":"OAM_11G"
},
{
"X-Idaas-Rest-Token-Value":"VERSION_4%7E3Bbc0YHd4upKZfjt3...M6ZORc3Q%3D%3D",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN::OAMMT",
"X-Idaas-Rest-Provider-Type":"OAM_11G"
}]
}
詳細は、Oracle Access Management管理者ガイドのJWT-OAM + PINトークン・サービス・プロバイダを使用するためのOAMの構成に関する項を参照してください。
OAMMSからのAppProfileデータの取得
次のサンプル・コマンドでは、Mobile and Socialサーバーへのアクセスおよびmobileapp1からのAppProfileの取得をテストします。この手順は、モバイル・ユースケースについてのみ必要です。URLの形式は次のとおりです。
http://oamms-host:port/oic_rest/rest/AppProfiles/mobileapp1?serviceDomain= MobileServiceDomain&osType=iPhone%20OS&osVer=4.0&clientSDKVersion=11.1.2.0.0
次のサンプル・レスポンスにはAppProfileデータが含まれています。
{
{
"CRHDelivery": "HTTP",
"SSOConfig": [
{
"mobileapp1":
{
"AndroidAppSignature": null,
"AndroidPackage": null,
"IOSBundleID": null,
"SSOInclusion": false,
"SSOPriority": -1,
"URLScheme": null
}
}],
"accessService": "/oic_rest/rest/mobilejwtoamauthentication/access",
"clientId": "mobileapp1",
"deleteService": "/oic_rest/rest/mobilejwtoamauthentication/delete",
"jailBreakingDetectionPolicy":
{
"autoCheckPeriodInMin": 60,
"clientSDKVersion": "11.1.2.0.0",
"detectionLocation": [
{
"action": "exists",
"filePath": "/bin/bash",
"success": true
},
{
"action": "exists",
"filePath": "/Applications/Cydia.app",
"success": true
},
{
"action": "exists",
"filePath": "/Applications/limera1n.app",
"success": true
},
{
"action": "exists",
"filePath": "/Applications/greenpois0n.app",
"success": true
},
{
"action": "exists",
"filePath": "/Applications/blackra1n.app",
"success": true
},
{
"action": "exists",
"filePath": "/Applications/blacksn0w.app",
"success": true
},
{
"action": "exists",
"filePath": "/Applications/redsn0w.app",
"success": true
},
{
"action": "exists",
"filePath": "/Applications/sn0wbreeze.app",
"success": true
}],
"osType": "iPhone OS",
"osVer": "4.0",
"policyExpirationInSec": 3600
},
"mobileAppConfig":
{
"AllowOfflineAuthentication": "false",
"AndroidPackage": null,
"AuthenticationRetryCount": "3",
"ClaimAttributes": null,
"IOSBundleID": null,
"ProfileCacheDuration": "60",
"RPWebView": "Embedded"
},
"mobileAuthStyle": "MOBILESERVICEAUTH",
"mobileCredLevelForRegApp": "USERTOKEN",
"registerService": "/oic_rest/rest/mobilejwtoamauthentication/register",
"rpLoginPage": "/oic_rp/login.jsp",
"serviceDomain": "MobileServiceDomain",
"userAuthnConfig": "JWT_UT+PIN",
"UserAuthenticationOutput": "USERTOKEN::JWTUT",
"TokenExchangeOutput": "USERTOKEN::OAMUT,USERTOKEN::OAMMT"
}, "userAuthnService": "/oic_rest/rest/mobilejwtoamauthentication/authenticate",
"userProfileService": "/oic_rest/rest/userprofile",
"validateService": "/oic_rest/rest/mobilejwtoamauthentication/validate"
}
認可ヘッダーのCRED値の生成
認可ヘッダーのCRED値の生成には次の形式を使用します。
CRED = base64{appprofile-name:clientRegHandle}
次に例を示します。
base64{mobileapp1:eyJvcmFjbGU6aWRtOmNsYWltczpjbGllbnQ6c2Rr...}
ユーザーの認証とJWTユーザー・トークンの取得
次のサンプル・モバイル・コマンドでは、ユーザーの認証時のJWTユーザー・トークンの取得をテストします。
curl -H "Content-Type: application/json" --request POST http://oamms-host:portnumber/oic_rest/rest/mobilejwtoamauthentication/authenticate -H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain' -H 'X-Idaas-Rest-Authorization: UIDPASSWORD cred="bW9iaWxlYXBwMTpleUp2Y21GamJHVTZhV1....x2UT0="' -d '{ "X-Idaas-Rest-New-Token-Type-To-Create":"USERTOKEN::JWTUT", "X-Idaas-Rest-Subject-Password":"password123", "deviceProfile": { "oracle:idm:claims:client:sdkversion":"11.1.2.0.0", "hardwareIds": { "oracle:idm:claims:client:udid":"0e83ff56a12a9cf0c7", "oracle:idm:claims:client:phonenumber":"1-650-555-1234", "oracle:idm:claims:client:macaddress":"00-16-41-34-2C-A6", "oracle:idm:claims:client:imei":"010113006310121" }, "oracle:idm:claims:client:jailbroken":false, "oracle:idm:claims:client:geolocation":"+40.689060,-74.044636", "oracle:idm:claims:client:networktype":"PHONE_CARRIER", "oracle:idm:claims:client:vpnenabled":false, "oracle:idm:claims:client:ostype":"iPhone OS", "oracle:idm:claims:client:phonecarriername":"AT&T", "oracle:idm:claims:client:locale":"EN-US", "oracle:idm:claims:client:osversion":"4.0" }, "X-Idaas-Rest-Subject-Username":"weblogic", "handles":{}, "X-Idaas-Rest-Subject-Type":"USERCREDENTIAL" }'
レスポンスは次のようになります。
{
"X-Idaas-Rest-Token-Value": "eyJhbGciOiJSUzUnR.....JeaVZGIP_YjMuPrgt82XXk0E",
"X-Idaas-Rest-User-Principal": "weblogic",
"X-Idaas-Rest-Provider-Type": "JWT",
"X-Idaas-Rest-Token-Type": "USERTOKEN"
}
トークン交換
次のサンプル・コマンド(モバイル用)では、JWTユーザー・トークンを交換し、cred(またはPIN)値を含めることによるOAMユーザー・トークンおよびOAMマスター・トークンの取得をテストします。
curl - H "Content-Type: application/json"
--request POST
http: //oamms-host:portnumber/oic_rest/rest/mobilejwtoamauthentication/authenticate
-H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain'
-H 'X-Idaas-Rest-Authorization: UIDPASSWORD
cred="bW9iaWxlYXBwMTpleU...hEdWtySHVGRnBkdkFORXZxMmx2UT0="'
- d '{
"X-Idaas-Rest-New-Token-Type-To-Create": ["USERTOKEN::OAMUT", "USERTOKEN::OAMMT"],
"deviceProfile":
{
"oracle:idm:claims:client:sdkversion": "11.1.2.0.0",
"hardwareIds":
{
"oracle:idm:claims:client:udid": "0e83ff56a12a9cf0c7",
"oracle:idm:claims:client:phonenumber": "1-650-555-1234",
"oracle:idm:claims:client:macaddress": "00-16-41-34-2C-A6",
"oracle:idm:claims:client:imei": "010113006310121"
},
"oracle:idm:claims:client:jailbroken": false,
"oracle:idm:claims:client:geolocation": "+40.689060,-74.044636",
"oracle:idm:claims:client:networktype": "PHONE_CARRIER",
"oracle:idm:claims:client:vpnenabled": false,
"oracle:idm:claims:client:ostype": "iPhone OS",
"oracle:idm:claims:client:phonecarriername": "AT&T",
"oracle:idm:claims:client:locale": "EN-US",
"oracle:idm:claims:client:osversion": "4.0"
},
"X-Idaas-Rest-Subject-Value": "eyJhbGciOiJSUzUxMp0aSI6...ZGIP_YjMuPrgt82XXk0E",
"X-Idaas-Rest-Subject-Type": "TOKEN",
"X-Idaas-Rest-Subject-Credential": "12345"
}
'
レスポンスは次のようになります。
{
"TokensList": [
{
"X-Idaas-Rest-Token-Value": "NIpXEwPuE0TLy2tM2WkKb/ZAg9k/uwgPx...kMsM4F+Vhv",
"X-Idaas-Rest-User-Principal": "weblogic",
"X-Idaas-Rest-Provider-Type": "OAM_11G",
"X-Idaas-Rest-Token-Type": "USERTOKEN::OAMUT"
},
{
"X-Idaas-Rest-Token-Value": "VERSION_4%7EctnTQTYMFtnxPhei8IJu...h1Pg1lh6bFw",
"X-Idaas-Rest-User-Principal": "weblogic",
"X-Idaas-Rest-Provider-Type": "OAM_11G",
"X-Idaas-Rest-Token-Type": "USERTOKEN::OAMMT"
}]
}
詳細は、Oracle Access Management管理者ガイドのJWT-OAM + PINトークン・サービス・プロバイダを使用するためのOAMの構成に関する項を参照してください。
ユーザーの認証とJWTユーザー・トークンの取得
次のサンプル・デスクトップ・コマンドでは、ユーザーの認証時のJWTユーザー・トークンの取得をテストします。
curl -H "Content-Type: application/json"
--request POST
http://oamms-host:portnumber/oic_rest/rest/jwtoamauthentication/authenticate
-d '
{
"X-Idaas-Rest-New-Token-Type-To-Create": "USERTOKEN::JWTUT",
"X-Idaas-Rest-Subject-Password": "password123",
"X-Idaas-Rest-Subject-Username": "weblogic",
"X-Idaas-Rest-Subject-Type": "USERCREDENTIAL"
}
'
レスポンスは次のようになります。
{
"X-Idaas-Rest-Token-Value": "eyJhbGciOiJSUz...m-5_-tPpDeINkYlhfTkkrfnarUhp2R0",
"X-Idaas-Rest-User-Principal": "weblogic",
"X-Idaas-Rest-Provider-Type": "JWT",
"X-Idaas-Rest-Token-Type": "USERTOKEN"
}
トークン交換(デスクトップ)
次のサンプル・デスクトップ・コマンドでは、JWTユーザー・トークンを交換し、cred(またはPIN)値を含めることによるOAMユーザー・トークンおよびOAMマスター・トークンの取得をテストします。
curl -H "Content-Type: application/json"
--request POST
http://oamms-host:portnumber/oic_rest/rest/jwtoamauthentication/authenticate
-d '
{
"X-Idaas-Rest-New-Token-Type-To-Create": "USERTOKEN::OAMUT",
"X-Idaas-Rest-Subject-Value": "eyJhbGciOiJSUz...m-5_-tPpDeINkYlhfTkkrfnarUhp2R0"",
"X-Idaas-Rest-Subject-Type": "TOKEN",
"X-Idaas-Rest-Subject-Credential": "12345"
}
'
レスポンスは次のようになります。
{
"X-Idaas-Rest-Token-Value": "KkraNeuiD6N+Jas2...WzaJSR/wzPy41Ekq/+NpGd/asagLl",
"X-Idaas-Rest-User-Principal": "weblogic",
"X-Idaas-Rest-Provider-Type": "OAM_11G",
"X-Idaas-Rest-Token-Type": "USERTOKEN"
}
次のコールはJWT-OAM認証サービス・プロバイダで使用される場合に有効です。
JWT-OAM認証サービス・プロバイダ
curl -H "Content-Type: application/json"
--request POST http://host:port/oic_rest/rest/jwtoamauthentication/access
-d '{
"X-Idaas-Rest-New-Token-Type-To-Create":"ACCESSTOKEN",
"X-Idaas-Rest-Application-Resource":"http:\/\/a6.example.com:7777\/idx.html",
"X-Idaas-Rest-Subject-Value":"<OAM USER TOKEN>",
"X-Idaas-Rest-Application-Context":"encquery%3DA1%2BnxGqYJxtmcteKYUux%2F7%2FV
aRBrBVRByRl81YM89Rv1940CTWlcddShowo2r516MLCa%2BHcPjgGNDeGVSagzGmV84GKybdiFtzrwd8ms
i9nRr4ijlW7%2BznCmb6C5xYiEXg6RBpI1Eud9Ce2VjNyrYY%2F3Ig7ntdhbF1NbznmV%2BwGf9S6ogxKR
abbKl2yOD5NO%2FC7NkmJOoDSisQb9IR9DnUxm1uBfHkKpE34RAyvpqg4xeGx2r%2Fuo0F0upeZ8KbsT%2
FugszrOdPR0S5O9%2BbPzV%2BNfzuFH25M0qriKbVj9EixNb0gzSEf2bCBmP9tXbWXDdG%20agentid%3D
adc2171186_11gwebgateprofile%20ver%3D1",
"X-Idaas-Rest-Subject-Type":"TOKEN"}'
モバイルJWT-OAM認証サービス・プロバイダ
curl -H "Content-Type: application/json"
--request POST http://host:port/oic_rest/rest/mobilejwtoamauthentication/access
-H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain'
-H 'X-Idaas-Rest-Authorization: UIDPASSWORD cred="BASE 64 Encoding (ClientID:CRH)"'
-d '{
"X-Idaas-Rest-New-Token-Type-To-Create":"ACCESSTOKEN",
"X-Idaas-Rest-Application-Resource":"http:\/\/6.example.com:7777\/idx.html",
"X-Idaas-Rest-Subject-Value":"<OAM USER TOKEN>",
"X-Idaas-Rest-Application-Context":"encquery%3DNgSQHsqHQeDgTwiOnZCqB3io74D2c
VJjuw0lf1LhvS%2F1L29aOBFehYXHFB%2Bhfd4XNHt21pqFLC5HdA%2Fi0ScENG3Tq7YK3Uv2yde1tCec
ojHmryb8zpTriUex3kYg83VRzg1gBmIJnTVpiCVgaVlBhe3mKE7liqYcJXmsXFudsjUn%2FcUuXuWdWXP
Qzi1d3WJ3lwdq0DPRnXUFGg%2BzsO%2BarKcreIg3BmGsmxZE7lLL6b9Wf9jbhOwlk1wsq2nqdFPDDS3O
Yz3T9o9ZtsO1xnKuHsLwoMaNtM%2FSIjxpcmrntyQw2w7i8NWxnVP7w1RJDvu7%20agentid%3Dadc217
1186_11gwebgateprofile%20ver%3D1",
"deviceProfile":
{
"oracle:idm:claims:client:sdkversion":"11.1.2.0.0",
"hardwareIds":
{
"oracle:idm:claims:client:udid":"0e83ff56a12a9cf0c7",
"oracle:idm:claims:client:phonenumber":"1-650-555-1234",
"oracle:idm:claims:client:macaddress":"00-16-41-34-2C-A6",
"oracle:idm:claims:client:imei":"010113006310121"
},
"oracle:idm:claims:client:jailbroken":false,
"oracle:idm:claims:client:geolocation":"+40.689060,-74.044636",
"oracle:idm:claims:client:networktype":"PHONE_CARRIER",
"oracle:idm:claims:client:vpnenabled":false,
"oracle:idm:claims:client:ostype":"iPhone OS",
"oracle:idm:claims:client:phonecarriername":"AT&T",
"oracle:idm:claims:client:locale":"EN-US",
"oracle:idm:claims:client:osversion":"4.0"
},
"X-Idaas-Rest-Subject-Type":"TOKEN"}'
JWT-OAM認証サービス・プロバイダ
{
"X-Idaas-Rest-Token-Value":"lroMQ%2Bwj7Ji4daRdXfGb8%2FG...AzWPTM%3D",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"ACCESSTOKEN",
"X-Idaas-Rest-Provider-Type":"OAM_11G"
}
モバイルJWT OAM認証サービス・プロバイダ
{
"X-Idaas-Rest-Token-Value":"xGhOiD%2FLVrnyU...nYgo%3D",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"ACCESSTOKEN",
"X-Idaas-Rest-Provider-Type":"OAM_11G"
}
次のコールはJWT-OAM認証サービス・プロバイダで使用される場合に有効です。
JWT-OAM認証サービス・プロバイダ
curl -i --request GET "http://host:port/oic_rest/rest/jwtoamauthentication/tokens/info?X-Idaas-Rest- Subject-Value=<JWT USER TOKEN>&X-Idaas-Rest-Subject-Type=TOKEN"
モバイルJWT-OAM認証サービス・プロバイダ
curl -i --request GET "http://host:port/oic_rest/rest/mobilejwtoamauthentication/tokens/info?X-Idaas-Rest-Subject-Value=<JWT USER TOKEN>&X-Idaas-Rest-Subject-Type=TOKEN" -H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain' -H 'X-Idaas-Rest-Authorization: UIDPASSWORD cred=" BASE 64 Encoding(CLIENTID:CRH) "'
JWT-OAM認証サービス・プロバイダ
{
"X-Idaas-Rest-Token-Value":"eyJhbGciO...fsOn3BIo6JOao3s",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
"X-Idaas-Rest-Provider-Type":"JWT"}
モバイルJWT OAM認証サービス・プロバイダ
{
"X-Idaas-Rest-Token-Value":"eyJhbGci....mVLKLtpONChYs",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
"X-Idaas-Rest-Provider-Type":"JWT"}
次のコールはJWT-OAM認証サービス・プロバイダで使用される場合に有効です。
JWT-OAM認証サービス・プロバイダ
curl -i --request GET "http://host:port/oic_rest/rest/jwtoamauthentication/tokens/info?X-Idaas-Rest- Subject-Value=<OAM USER TOKEN>&X-Idaas-Rest-Subject-Type=TOKEN"
モバイルJWT-OAM認証サービス・プロバイダ
curl -i --request GET "http://host:port/oic_rest/rest/mobilejwtoamauthentication/tokens/info?X-Idaas-Rest- Subject-Value=<OAM** USER TOKEN>&X-Idaas-Rest-Subject-Type=TOKEN" -H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain' -H 'X-Idaas-Rest-Authorization: UIDPASSWORD cred=" BASE 64 Encoding(CLIENTID:CRH) "'
JWT-OAM認証サービス・プロバイダ
{
"X-Idaas-Rest-Token-Value":"ipZ45ey55BAk...NqM3YsycmdG0tuDGyfdY=",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
"X-Idaas-Rest-Provider-Type":"OAM_11G"}
モバイルJWT OAM認証サービス・プロバイダ
{
"X-Idaas-Rest-Token-Value":"8C2wieU9h7VfQM...UmubmxvJ+SpL5fLZYpbU=",
"X-Idaas-Rest-User-Principal":"weblogic",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
"X-Idaas-Rest-Provider-Type":"OAM_11G"}
この項のcURLコマンドは、クライアント、ユーザーおよびアクセス・トークンをリクエストし、クライアント登録ハンドルを作成するために、モバイル・シングル・サインオン・エージェントがMobile and Socialサーバーに送信するRESTコールを示します。
次のコールについて説明します。
モバイル・シングル・サインオン・クライアント・アプリケーションのためのクライアント登録ハンドルの作成(ユーザー名のシナリオ)
モバイル・シングル・サインオン・クライアント・アプリケーションのためのクライアント登録ハンドルの作成(ユーザー・トークンのシナリオ)
ユーザー名およびパスワードに基づいて、モバイル・シングル・サインオン(SSO)エージェント・アプリケーションのためのクライアント登録ハンドルを作成する方法を示します。この例で、モバイル・シングル・サインオン・エージェント・アプリケーションの名前はMobileAgent1です。
curl -H "Content-Type: application/json" --request POST
http://localhost:18001/idaas_rest/rest/mobilejwtauthentication/register
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"theUserName",
"X-Idaas-Rest-Subject-Password":"thePassword",
"X-Idaas-Rest-New-Token-Type-To-Create":"CLIENTREGHANDLE",
"deviceProfile" : { ... },
"clientId": "MobileAgent1" }'
この例は、モバイル・シングル・サインオン・エージェントがユーザー名とパスワードを使用してどのようにモバイル・ビジネス・アプリケーション(クライアント・アプリケーション)のクライアント登録ハンドルを作成するのかを示しています。この例で、リクエストはMobileExpenseReport1というモバイル・ビジネス・アプリケーションで生成されています。
curl -H "Content-Type: application/json" --request POST
http://localhost:18001/idaas_rest/rest/mobilejwtauthentication/register
-H "X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD ..."
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"theUserName",
"X-Idaas-Rest-Subject-Password":"thePassword",
"X-Idaas-Rest-New-Token-Type-To-Create":"CLIENTREGHANDLE",
"deviceProfile" : { ... },
handles : {
"oaam.session" : "...",
"oaam.device" : "..."
},
"clientId": "MobileExpenseReport1" } '
この例は前の例に似ています。ただし、ユーザー名とパスワードのかわりにユーザー・トークンが送信されます。ユーザー・トークンは、認証済ユーザーがそのデバイスを認可したことを表すセキュリティ資格証明です。前の例と同様、リクエストはMobileExpenseReport1というモバイル・ビジネス・アプリケーションで生成されています。
curl -H "Content-Type: application/json" --request POST
http://localhost:18001/idaas_rest/rest/mobilejwtauthentication/register
-H "X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD ..."
-d '{
"X-Idaas-Rest-Subject-Type":"TOKEN",
"X-Idaas-Rest-Subject-Value":"ey...",
"X-Idaas-Rest-New-Token-Type-To-Create":"CLIENTREGHANDLE",
"deviceProfile" : { ... },
handles : {
"oaam.session" : "...",
"oaam.device" : "..."
},
"clientId": "MobileExpenseReport1" } '
{
"X-Idaas-Rest-Token-Value":"ey...",
"X-Idaas-Rest-Token-Type":"CLIENTREGHANDLE",
handles : {
"oaam.session" : { ... } ,
"oaam.device" : { ... }
}
}
CLIENTREGHANDLEおよびその他のトークンの値は、表示上の都合で短縮されています。
クライアント・アプリケーションを登録する際、該当するモバイル・エージェントのクライアント・アプリケーション・プロファイルでMobile.reauthnForRegNewClientApp構成値がfalseに設定されている場合、ユーザー・トークンは単にユーザー登録を表します。
HTTPヘッダーX-IDAAS-REST-AUTHORIZATIONには、モバイル・エージェント・アプリケーション(MobileAgent1など)のクライアント登録ハンドルを含むUIDPASSWORDスキーム値があります。
この例は、ユーザー・トークンの作成をリクエストするために、モバイル・シングル・サインオン・エージェントがMobile and Socialサーバーに送信するRESTコールを示しています。
curl -H "Content-Type: application/json" --request POST
http://localhost:18001/idaas_rest/rest/mobilejwtauthentication/authenticate
-H 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="..." '
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"theUserName",
"X-Idaas-Rest-Subject-Password":"thePassword",
"X-Idaas-Rest-New-Token-Type-To-Create":"USERTOKEN",
"handles" : { ... },
"deviceProfile" : { ... } }'
{
"X-Idaas-Rest-Token-Value":"ey...",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
handles : {
"oaam.session" : { ... } ,
"oaam.device" : { ... }
}
}
トークンの値は、表示上の都合で短縮されています。
SSOエージェント・アプリケーション(MobileAgent1など)は、ユーザー名とパスワードを使用してユーザー・トークンをリクエストします。
HTTPヘッダーX-IDAAS-REST-AUTHORIZATIONには、SSOエージェント・アプリケーション(MobileAgent1)のクライアント登録ハンドルを含むUIDPASSWORDスキーム値があります。
この例は、モバイル・ビジネス・アプリケーションのかわりのモバイルSSOエージェントによるアクセス・トークンのリクエストを示しています。モバイルSSOエージェントの名前はMobileAgent1、ビジネス・アプリケーションの名前はMobileExpenseReport1です。
モバイルOAMAuthenticationの例
curl -H "Content-Type: application/json"
-H 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="..." '
-H 'X-IDAAS-REST-AGENT-AUTHORIZATION: UIDPASSWORD cred="..." '
--request POST
http://localhost:18001/idaas_rest/rest/mobileoamauthentication/access
-d '{
"X-Idaas-Rest-Subject-Type":"TOKEN",
"X-Idaas-Rest-Subject-Value":"... USER TOKEN VALUE...",
"X-Idaas-Rest-Application-Context":"75sSbBZZKJiUOAWikZxsKA==",
"X-Idaas-Rest-Application-Resource":
"http:/wengate123.us.example.com:7779/index.html",
"X-Idaas-Rest-New-Token-Type-To-Create":"ACCESSTOKEN",
"handles" : { ... },
"deviceProfile" : { ... }
}'
モバイルJWTAuthenticationの例
curl -H "Content-Type: application/json"
-H 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="..." '
-H 'X-IDAAS-REST-AGENT-AUTHORIZATION: UIDPASSWORD cred="..." '
--request POST
http://localhost:18001/idaas_rest/rest/mobilejwtauthentication/access
-d '{
"X-Idaas-Rest-Subject-Type":"TOKEN",
"X-Idaas-Rest-Subject-Value":"... USER TOKEN VALUE ...",
"X-Idaas-Rest-Application-Resource":"...",
"X-Idaas-Rest-New-Token-Type-To-Create":"ACCESSTOKEN",
"handles" : { ... },
"deviceProfile" : { ... }
}'
{
"X-Idaas-Rest-Token-Value":"...",
"X-Idaas-Rest-Token-Type":"ACCESSTOKEN",
handles : {
"oaam.session" : { ... } ,
"oaam.device" : { ... }
}
}
このHTTPリクエストには2つのヘッダーがあります。1つ目にはSSOエージェント・アプリケーションのクライアント登録ハンドルが含まれ、2つ目にはビジネス・アプリケーションのクライアント登録ハンドルが含まれています。
ヘッダーX-IDAAS-REST-AGENT-AUTHORIZATIONには、SSOエージェント・アプリケーション(MobileAgent1)のクライアント登録ハンドルが含まれています。
ヘッダーX-IDAAS-REST-AUTHORIZATIONには、ビジネス・アプリケーション(MobileExpenseReport1)のクライアント登録ハンドルが含まれています。
Mobile and Socialサーバー・コンポーネント(特にモバイル・サービス・コンポーネント)は、両方のハンドルの有効性を検証します。これにより、両方のアプリケーションがターゲット・サービス・ドメインに確実にリストされます。基礎となるトークン・サービスまたは認証サービスは、ユーザー・トークンの値の有効性の検証時にアクセス・トークンを提供します。Access Managerの場合、X-Idaas-Rest-Application-Resourceフィールドにより、特定のWebGateで保護されたリソースが参照されます。Access Managerアプリケーション・コンテキストに該当するX-Idaas-RESt-Application-Contextフィールドもあります。
トークンの値は、表示上の都合で短縮されています。
この例は、モバイルSSOエージェントによる独自に使用するアクセス・トークンのリクエストを示しています。モバイルSSOエージェントがクライアント・アプリケーションのかわりにトークンをリクエストするには、アクセス・トークンが必要です。
モバイルOAMAuthenticationの例
curl -H "Content-Type: application/json"
-H 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="..." '
--request POST http://localhost:18001/idaas_
rest/rest/mobileoamauthentication/access
-d '{
"X-Idaas-Rest-Subject-Type":"TOKEN",
"X-Idaas-Rest-Subject-Value":"... USER TOKEN VALUE...",
"X-Idaas-Rest-Application-Context":"75sSbBZZKJiUOAWikZxsKA==",
"X-Idaas-Rest-Application-Resource":"http:/wg12.example.com:7779/index.html",
"X-Idaas-Rest-New-Token-Type-To-Create":"ACCESSTOKEN",
"handles" : { ... },
"deviceProfile" : { ... }
}'
モバイルJWTAuthenticationの例
curl -H "Content-Type: application/json"
-H 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="..." '
--request POST http://localhost:18001/idaas_
rest/rest/mobilejwtauthentication/access
-d '{
"X-Idaas-Rest-Subject-Type":"TOKEN",
"X-Idaas-Rest-Subject-Value":"... USER TOKEN VALUE ...",
"X-Idaas-Rest-Application-Resource":"...",
"X-Idaas-Rest-New-Token-Type-To-Create":"ACCESSTOKEN",
"handles" : { ... },
"deviceProfile" : { ... }
}'
{
"X-Idaas-Rest-Token-Value":"...",
"X-Idaas-Rest-Token-Type":"ACCESSTOKEN",
handles : {
"oaam.session" : { ... } ,
"oaam.device" : { ... }
}
}
このHTTPリクエストには1つのヘッダー、X-IDAAS-REST-AUTHORIZATIONがあり、これにはSSOエージェント・アプリケーション(MobileAgent1)のクライアント登録ハンドルが含まれています。
このリクエストにはX-IDAAS-REST-AGENT-AUTHORIZATIONヘッダーはありません。
Mobile and Socialサーバー・コンポーネント(特にモバイル・サービス・コンポーネント)は、両方のハンドルの有効性を検証します。これにより、MobileAgent1アプリケーションがターゲット・サービス・ドメインにリストされ、SSO対応アプリケーションとしてマークされるようになります(つまり、このアプリケーションはSSO優先度にリストされます)。
トークンの値は、表示上の都合で短縮されています。
この例は、クライアント登録ハンドルの検証リクエストを示しています。Mobile and Socialには、トークンとハンドルの検証ロジックがあるため、モバイル・クライアントがこの検証をコールする必要はありません。
Mobile and Socialサーバーにユーザー・トークンまたはアクセス・トークンの作成のリクエストが送信されると、このサービスは、クライアント登録ハンドルを含む1つまたは2つのHTTPヘッダー(X-IDAAS-REST-AUTHORIZATIONおよびX-IDAAS-REST-AGENT-AUTHORIZATION)を検証します。
この項のcURLコマンドは、接続されるディレクトリ・サーバーを使用してユーザー・プロファイル・サービス・トランザクションを実行するため、クライアント・アプリケーションからMobile and Socialサーバーに送信されるRESTコールを示しています。
ユーザー・プロファイルcURLコマンドは、次の項に分類されています。
基本的なユーザー操作コマンドには次のようなものがあります。
リモート・ディレクトリでユーザー・プロファイルを作成する方法を示します。
基本的なグループ操作コマンドには次のようなものがあります。
リモート・ディレクトリでグループ・プロファイルを作成する方法を示します。
リモート・ディレクトリでグループ・プロファイルを更新する方法を示します。
membersおよびmemberOfの論理エンティティ関係は、どちらもLDAPグループ・エンティティ内の同じメンバー属性を指しています。グループに関しては、ユーザーの追加、削除、読取りおよび検索に両方の論理エンティティ関係を使用できます。
この項では次の操作について記載しています。
ユーザーをグループのメンバーにする方法を示します。
ユーザーJohnの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/ -d
'{"uid":"John"Anderson","commonname":"John Anderson","firstname":"John"}'
グループgroup1の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ -d
'{"description":"group1 testing","commonname":"group1"}'
memberOf関係の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/John/memberOf/ -d
'{"group-uri":"\/idaas_rest\/rest\/userprofile\/group\/group1",
"person-uri":"\/idaas_rest\/rest\/userprofile\/people\/John"}'
指定されたユーザーのmemberOf関係プロファイルを取得する方法を示します。
memberOf関係の削除方法を示します。
memberOf関係の削除
curl -i --request DELETE "http://localhost:14100/idaas_rest/ rest/userprofile/people/John/memberOf/group1/"
ユーザーJohnの削除
curl -i --request DELETE http://localhost:14100/idaas_rest/ rest/userprofile/people/John/
グループgroup1の削除
curl -i --request DELETE "http://localhost:14100/idaas_rest/ rest/userprofile/groups/group1"
membersおよびmemberOfの論理エンティティ関係は、どちらもLDAPグループ・エンティティ内の同じメンバー属性を指しています。グループに関しては、ユーザーの追加、削除、読取りおよび検索に両方の論理エンティティ関係を使用できます。
この項では次の操作について記載しています。
ユーザーをグループに割り当てる方法を示します。
ユーザーJohnの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/ -d
'{"uid":"John"Anderson","commonname":"John Anderson","firstname":"John"}'
グループgroup1の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ -d
'{"description":"group1 testuing","commonname":"group1"}'
members関係の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/group1/members -d
'{"group-uri":"\/idaas_rest\/rest\/userprofile\/group\/group1",
"person-uri":"\/idaas_rest\/rest\/userprofile\/people\/John"}'
members関係の読取り方法を示します。
members関係プロファイルの削除方法を示します。
members関係の削除
curl -i --request DELETE "http://localhost:14100/idaas_rest/ rest/userprofile/people/group1/members/John/"
ユーザーJohnの削除
curl -i --request DELETE http://localhost:14100/idaas_rest/ rest/userprofile/people/John/
グループgroup1の削除
curl -i --request DELETE "http://localhost:14100/idaas_rest/ rest/userprofile/groups/group1/"
この項では次の操作について記載しています。
マネージャをユーザーに割り当てる方法を示します。
ユーザーJohnの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/ -d
'{"uid":"John"Anderson","commonname":"John Anderson","firstname":"John"}'
ユーザーAlanの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/ -d
'{"uid":"Alan","description":"Manager User","lastname":"Doe",
"commonname":"Alan Doe","firstname":"Alan"}'
manager関係の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/John/manager/ -d
'{"report-uri":"\/idaas_rest\/rest\/userprofile\/people\/John",
"manager-uri":"\/idaas_rest\/rest\/userprofile\/people\/Alan"}'
manager関係プロファイルの読取り方法を示します。
manager関係の削除方法を示します。
manager関係の削除
curl -i --request DELETE "http://localhost:14100/ idaas_rest/rest/userprofile/people/John/manager/Alan"
ユーザーJohnの削除
curl -i --request DELETE http://localhost:14100/ idaas_rest/rest/userprofile/people/John/
ユーザーAlanの削除
curl -i --request DELETE "http://localhost:14100/ idaas_rest/rest/userprofile/people/Alan/"
この項では次の操作について記載しています。
reports-to関係の作成方法を示します。
ユーザーJohnの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/ -d
'{"uid":"John"Anderson","commonname":"John Anderson","firstname":"John"}'
ユーザーAlanの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/ -d
'{"uid":"Alan","description":"Manager User","lastname":"Doe",
"commonname":"Alan Doe","firstname":"Alan"}'
reports関係の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/Alan/reports/ -d
'{"report-uri":"\/idaas_rest\/rest\/userprofile\/people\/John",
"manager-uri":"\/idaas_rest\/rest\/userprofile\/people\/Alan"}'
reports-to関係の読取り方法を示します。
reports-to関係の削除方法を示します。
reports関係の削除
curl -i --request DELETE "http://localhost:14100/idaas_rest/ rest/userprofile/people/Alan/reports/John"
ユーザーJohnの削除
curl -i --request DELETE http://localhost:14100/idaas_rest/ rest/userprofile/people/John/
ユーザーAlanの削除
curl -i --request DELETE "http://localhost:14100/idaas_rest/ rest/userprofile/people/Alan/"
この項では次の操作について記載しています。
ownerOf関係の作成方法を示します。
ユーザーJohnの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/ -d
'{"uid":"John"Anderson","commonname":"John Anderson","firstname":"John"}'
グループgroup1の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ -d
'{"description":"group1 testuing","commonname":"group1"}'
ownerOf関係の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/John/ownerOf/ -d
'{"group-uri":"\/idaas_rest\/rest\/userprofile\/group\/group1",
"owner-uri":"\/idaas_rest\/rest\/userprofile\/people\/John"}'
ownerOf関係の読取り方法を示します。
ownerOf関係の削除方法を示します。
ownerOf関係の削除
curl -i --request DELETE "http://localhost:14100/idaas_rest/ rest/userprofile/people/John/ownerOf/group1"
ユーザーJohnの削除
curl -i --request DELETE http://localhost:14100/idaas_rest/ rest/userprofile/people/John/
グループgroup1の削除
curl -i --request DELETE "http://localhost:14100/idaas_rest/ rest/userprofile/groups/group1"
この項では次の操作について記載しています。
personOwner関係の作成方法を示します。
ユーザーJohnの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/ -d
'{"uid":"John"Anderson","commonname":"John Anderson","firstname":"John"}'
グループgroup1の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ -d
'{"description":"group1 testing","commonname":"group1"}'
personOwner関係の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/group1/personOwner -d
'{"group-uri":"\/idaas_rest\/rest\/userprofile\/group\/group1",
"owner-uri":"\/idaas_rest\/rest\/userprofile\/people\/John"}'
personOwner関係の読取り方法を示します。
personOwner関係の削除方法を示します。
personOwner関係の削除
curl -i --request DELETE "http://localhost:18001/idaas_rest/ rest/userprofile/groups/group1/personOwner/John"
ユーザーJohnの削除
curl -i --request DELETE http://localhost:14100/idaas_rest/ rest/userprofile/people/John/
グループgroup1の削除
curl -i --request DELETE "http://localhost:14100/idaas_rest/ rest/userprofile/groups/group1/"
この項では次の操作について記載しています。
groupOwner関係の作成方法を示します。
グループXYZの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ -d
'{"description":"XYZ Group","commonname":"XYZ"}'
グループABCの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ -d
'{"description":"ABC Group","commonname":"ABC"}'
groupOwner関係の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/XYZ/groupOwner -d
'{"group-uri":"\/idaas_rest\/rest\/userprofile\/group\/XYZ",
"owner-uri":"\/idaas_rest\/rest\/userprofile\/group\/ABC"}'
groupOwner関係の読取り方法を示します。
groupOwner関係の削除方法を示します。
groupOwner関係の削除
curl -i --request DELETE "http://localhost:14100/ idaas_rest/rest/userprofile/groups/XYZ/groupOwner/ABC"
グループXYZの削除
curl -i --request DELETE http://localhost:14100/ idaas_rest/rest/userprofile/groups/XYZ/
グループABCの削除
curl -i --request DELETE "http://localhost:14100/ idaas_rest/rest/userprofile/groups/ABC/"
この項では次の操作について記載しています。
groupOwnerOf関係の作成方法を示します。
グループXYZの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ -d
'{"description":"XYZ Group","commonname":"XYZ"}'
グループABCの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ -d
'{"description":"ABC Group","commonname":"ABC"}'
groupOwnerOf関係の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ABC/groupOwnerOf -d
'{"group-uri":"\/idaas_rest\/rest\/userprofile\/group\/XYZ",
"owner-uri":"\/idaas_rest\/rest\/userprofile\/group\/ABC"}'
groupOwnerOf関係の読取り方法を示します。
groupOwnerOf関係の削除方法を示します。
groupOwnerOf関係の削除
curl -i --request DELETE "http://localhost:14100/ idaas_rest/rest/userprofile/groups/ABC/groupOwnerOf/XYZ"
グループXYZの削除
curl -i --request DELETE http://localhost:14100/ idaas_rest/rest/userprofile/groups/XYZ/
グループABCの削除
curl -i --request DELETE "http://localhost:14100/ idaas_rest/rest/userprofile/groups/ABC/"
この項では次の操作について記載しています。
groupMemberOf関係の作成方法を示します。
グループXYZの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ -d
'{"description":"XYZ Group","commonname":"XYZ"}'
グループiCLOUDの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ -d
'{"description":"iCloud Group","commonname":"iCLOUD"}'
groupMemberOf関係の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/XYZ/groupMemberOf -d
'{"group-uri":"\/idaas_rest\/rest\/userprofile\/groups\/iCLOUD",
"member-uri":"\/idaas_rest\/rest\/userprofile\/groups\/XYZ"}'
groupMemberOf関係の読取り方法を示します。
groupMemberOf関係の削除方法を示します。
groupMemberOf関係の削除
curl -i --request DELETE "http://localhost:14100/ idaas_rest/rest/userprofile/groups/XYZ/groupMemberOf/iCLOUD"
グループXYZの削除
curl -i --request DELETE http://localhost:14100/ idaas_rest/rest/userprofile/groups/XYZ/
グループiCLOUDの削除
curl -i --request DELETE "http://localhost:14100/ idaas_rest/rest/userprofile/groups/iCLOUD/"
この項では次の操作について記載しています。
groupMembers関係の作成方法を示します。
グループXYZの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ -d
'{"description":"XYZ Group","commonname":"XYZ"}'
グループiCLOUDの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/ -d
'{"description":"iCloud Group","commonname":"iCLOUD"}'
groupMembers関係の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/groups/iCLOUD/groupMembers -d
'{"group-uri":"\/idaas_rest\/rest\/userprofile\/groups\/iCLOUD",
"member-uri":"\/idaas_rest\/rest\/userprofile\/groups\/XYZ"}'
groupMembers関係の読取り方法を示します。
groupMembers関係の削除方法を示します。
groupMembers関係の削除
curl -i --request DELETE "http://localhost:14100/idaas_rest/rest/ userprofile/groups/iCLOUD/groupMembers"
グループXYZの削除
curl -i --request DELETE http://localhost:14100/ idaas_rest/rest/userprofile/groups/XYZ/
グループiCLOUDの削除
curl -i --request DELETE "http://localhost:14100/ idaas_rest/rest/userprofile/groups/iCLOUD/"
この項では次の操作について記載しています。
すべてのユーザーのリストを取得する方法を示します。
{"next":"\/idaas_rest\/rest\/userprofile\/people?pageSize=10&pagePos=1",
"elements":[{"uid":"OracleSystemUser","guid":"E9A3B390581611E19F08FB1E3902A71C",
"description":"Oracle]]]] application software system user.",
"name":"OracleSystemUser","lastname":"OracleSystemUser",
"commonname":"OracleSystemUser","loginid":"OracleSystemUser",
"uniquename":"E9A3B390581611E19F08FB1E3902A71C",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/OracleSystemUser"},
{"uid":"weblogic","guid":"E9A4C500581611E19F08FB1E3902A71C",
"description":"This user is the default administrator.","name":"weblogic",
"lastname":"weblogic","commonname":"weblogic","loginid":"weblogic",
"uniquename":"E9A4C500581611E19F08FB1E3902A71C",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/weblogic"},
{"uid":"alice","guid":"D8D1907158F511E1BFDCF77FB8E715D5",
"description":"This test user is alice.","name":"alice","lastname":"alice",
"commonname":"alice","loginid":"alice",
"uniquename":"D8D1907158F511E1BFDCF77FB8E715D5",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/alice"},
{"uid":"sean","guid":"D8D5AF2058F511E1BFDCF77FB8E715D5",
"description":"This test user is sean.","name":"sean","lastname":"sean",
"commonname":"sean","loginid":"sean",
"uniquename":"D8D5AF2058F511E1BFDCF77FB8E715D5",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/sean"},
{"uid":"wei","guid":"D8D6245058F511E1BFDCF77FB8E715D5",
"description":"This test user is wei.","name":"wei","lastname":"wei",
"commonname":"wei","loginid":"wei",
"uniquename":"D8D6245058F511E1BFDCF77FB8E715D5",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/wei"},
{"uid":"malla","guid":"D8D64B6058F511E1BFDCF77FB8E715D5",
"description":"This test user is malla.","name":"malla","lastname":"malla",
"commonname":"malla","loginid":"malla",
"uniquename":"D8D64B6058F511E1BFDCF77FB8E715D5",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/malla"},
{"uid":"alan","guid":"D8D6998058F511E1BFDCF77FB8E715D5",
"description":"This test user is alan.","name":"alan","lastname":"alan",
"commonname":"alan","loginid":"alan",
"uniquename":"D8D6998058F511E1BFDCF77FB8E715D5",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/alan"},
"uri":"\/idaas_rest\/rest\/userprofile\/people?pageSize=10&pagePos=0"}
ページ・サイズとページの位置を指定してユーザーのリストを取得する方法を示します。
curl -i --request GET "http://localhost:14100/ idaas_rest/rest/userprofile/people?pagePos=0&pageSize=1"
{"next":"\/idaas_rest\/rest\/userprofile\/people?pageSize=1&pagePos=1",
"elements":[{"uid":"OracleSystemUser","guid":"E9A3B390581611E19F08FB1E3902A71C",
"description":"Oracle]] application software system user.",
"name":"OracleSystemUser","lastname":"OracleSystemUser",
"commonname":"OracleSystemUser","loginid":"OracleSystemUser",
"uniquename":"E9A3B390581611E19F08FB1E3902A71C",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/OracleSystemUser"}],
"uri":"\/idaas_rest\/rest\/userprofile\/people?pageSize=1&pagePos=0"}
検索パラメータは設定するが検索フィルタは設定せずにユーザーのリストを取得する方法を示します。
curl -i --request GET "http:/localhost:14100/idaas_rest/rest/userprofile/people/ ?pagePos=0&pageSize=10&searchparam.name=John*"
{"elements":[{"uid":"John","guid":"E932E4F0590911E1BFDCF77FB8E715D5",
"description":"test user","name":"John","lastname":"Anderson",
"commonname":"John Anderson","loginid":"John","firstname":"John",
"uniquename":"E932E4F0590911E1BFDCF77FB8E715D5",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/John"}],
"uri":"\/idaas_rest\/rest\/userprofile\/people?pageSize=10
&searchparam.name=John+Anderson&pagePos=0"}
デフォルトのそのまま使用できる単純なAND検索フィルタを指定して、ユーザーのリストを取得する方法を示します。
curl -i --request GET "http:/localhost:14100/idaas_rest/rest/userprofile/ people?searchFilter=SimpleOR&searchparam.uid=John&searchparam.lastname=TEST"
{"elements":[{
"uid":"John",
"guid":"E932E4F0590911E1BFDCF77FB8E715D5",
"description":"test user",
"name":"John",
"lastname":"Anderson",
"commonname":"John Anderson",
"loginid":"John",
"firstname":"John",
"uniquename":"E932E4F0590911E1BFDCF77FB8E715D5",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/John"}],
"uri":"\/idaas_rest\/rest\/userprofile\/people?pageSize=10
&searchFilter=SimpleOR&searchparam.lastname=TEST&searchparam.uid=John&pagePos=0"}
グループ情報の取得方法を示します。
curl -i --request GET "http:/localhost:14100/idaas_rest/rest/userprofile/ groups/?pagePos=0&pageSize=2"
{"next":"\/idaas_rest\/rest\/userprofile\/groups?pageSize=2&pagePos=1",
"elements":[{
"guid":"7CF7EC60724811E1BFB5AB6A1E4E415B",
"description":"AdminChannelUsers]] can access the admin channel.",
"name":"AdminChannelUsers",
"commonname":"AdminChannelUsers",
"uniquename":"7CF7EC60724811E1BFB5AB6A1E4E415B",
"uri":"\/idaas_rest\/rest\/userprofile\/groups\/AdminChannelUsers"},
{"guid":"7CF7EC61724811E1BFB5AB6A1E4E415B",
"description":"Administrators can view and modify all resource attributes and start and stop servers.",
"name":"Administrators",
"commonname":"Administrators",
"uniquename":"7CF7EC61724811E1BFB5AB6A1E4E415B",
"uri":"\/idaas_rest\/rest\/userprofile\/groups\/Administrators"}],
"uri":"\/idaas_rest\/rest\/userprofile\/groups?pageSize=2&pagePos=0"}
組織内の人の名前を指定して、その人のマネージャを検索できます。
curl -i --request GET "http:/localhost:14100/idaas_rest/rest/userprofile/ people/JohnD/manager/?pagePos=0&pageSize=2"
{"elements":[{
"report-uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD\/manager\/SusanS",
"manager-uri":{
"uid":"SusanS",
"manager":"\/idaas_rest\/rest\/userprofile\/people\/SusanS\/manager",
"state":"CA",
"lastname":"Smith",
"firstname":"Susan",
"loginid":"SusanS",
"uniquename":"5B543C30790511E1AF41BD17BAB1A1C1",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/SusanS",
"country":"USA",
"guid":"5B543C30790511E1AF41BD17BAB1A1C1",
"title":"Sr]]. Director, Development ",
"name":"SusanS",
"commonname":"Susan Smith"}
}],
"uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD\/manager?pageSize=2
&pagePos=0"}
attrsToFetch問合せパラメータを使用して、特定の属性セットを取得します。このパラメータが指定されない場合は、属性のフル・セットが返されます。複数の属性を指定するには、属性名のカンマ区切りリストを使用します。
次に例を示します。
.../people/alice?attrsToFetch=uid,email
attrsToFetch問合せパラメータは、検索、読取り、ユーザー、グループまたは関係の任意の操作で使用できます。
この項では、次の例を示します。
この例は、ユーザーの一般名のみを取得する方法を示しています。attrsToFetchパラメータを使用しないと、システムはユーザー属性のフル・セットを取得します。
curl -i --request GET "http://host:10/idaas_rest/rest/userprofile/people/Alice/?attrsToFetch=commonname"
{
"commonname":"Alice Mac",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/Alice"}
{
"uid":"Alice",
"guid":"C04020C078FE11E1AF41BD17BAB1A1C1",
"description":"Alice User",
"name":"Alice",
"lastname":"Mac",
"commonname":"Alice Mac",
"loginid":"Alice",
"firstname":"Alice",
"uniquename":"C04020C078FE11E1AF41BD17BAB1A1C1",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/Alice"}
この例は、グループを検索し、各グループの名前のみを取得する方法を示しています。attrsToFetchパラメータを使用しないと、システムは各グループのすべての属性を取得します。
curl -i --request GET "http:/host:10/idaas_rest/rest/userprofile/groups?pagePos=0&pageSize=2 &attrsToFetch=name"
{"next":
"\/idaas_rest\/rest\/userprofile\/groups?pageSize=2&attrsToFetch=name&pagePos=1",
"elements":[{
"name":"AdminChannelUsers",
"uri":"\/idaas_rest\/rest\/userprofile\/groups\/AdminChannelUsers"},
{
"name":"Administrators",
"uri":"\/idaas_rest\/rest\/userprofile\/groups\/Administrators"
}],
"uri":"\/idaas_rest\/rest\/userprofile\/groups?pageSize=2&attrsToFetch=name
&pagePos=0"}
{"next":
"\/idaas_rest\/rest\/userprofile\/groups?pageSize=2&pagePos=1",
"elements":[{
"guid":"7CF7EC60724811E1BFB5AB6A1E4E415B",
"description":"AdminChannelUsers can access the admin channel.",
"name":"AdminChannelUsers",
"commonname":"AdminChannelUsers",
"uniquename":"7CF7EC60724811E1BFB5AB6A1E4E415B",
"uri":"\/idaas_rest\/rest\/userprofile\/groups\/AdminChannelUsers"},
{
"guid":"7CF7EC61724811E1BFB5AB6A1E4E415B",
"description":"Administrators can view and modify all resource attributes and
start and stop servers.",
"name":"Administrators",
"commonname":"Administrators",
"uniquename":"7CF7EC61724811E1BFB5AB6A1E4E415B",
"uri":"\/idaas_rest\/rest\/userprofile\/groups\/Administrators"
}],
"uri":"\/idaas_rest\/rest\/userprofile\/groups?pageSize=2&pagePos=0"}
この例は、ユーザーが所属するグループの名前を取得する方法を示しています。attrsToFetchパラメータを使用しないと、システムは各グループのグループ属性のフル・セットを取得します。
curl -i --request GET "http://host:10/idaas_rest/rest/userprofile/people/weblogic/memberOf? pagePos=0&pageSize=2&attrsToFetch=name"
{"next":
"\/idaas_rest\/rest\/userprofile\/people\/weblogic\/memberOf?
pageSize=2&attrsToFetch=name&pagePos=1",
"elements":[
{
"group-uri":
{
"name":"Administrators",
"uri":"\/idaas_rest\/rest\/userprofile\/groups\/Administrators"
},
"person-uri":"\/idaas_rest\/rest\/userprofile\/people\/weblogic",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/weblogic\/memberOf\/
Administrators"
},
{
"group-uri":
{
"name":"OAAMEnvAdminGroup",
"uri":"\/idaas_rest\/rest\/userprofile\/groups\/OAAMEnvAdminGroup"
},
"person-uri":"\/idaas_rest\/rest\/userprofile\/people\/weblogic",
"uri":"\/idaas_ rest\/rest\/userprofile\/people\/weblogic\/memberOf\/
OAAMEnvAdminGroup"
}],
"uri":"\/idaas_rest\/rest\/userprofile\/people\/weblogic\/memberOf?
pageSize=2&attrsToFetch=name&pagePos=0"}
{"next":
"\/idaas_rest\/rest\/userprofile\/people\/weblogic\/memberOf?
pageSize=2&pagePos=1",
"elements":[
{
"group-uri":
{
"guid":"7CF7EC61724811E1BFB5AB6A1E4E415B",
"description":"Administrators can view and modify all resource attributes
and start and stop servers.",
"name":"Administrators",
"commonname":"Administrators",
"uniquename":"7CF7EC61724811E1BFB5AB6A1E4E415B",
"uri":"\/idaas_rest\/rest\/userprofile\/groups\/Administrators"
},
"person-uri":"\/idaas_rest\/rest\/userprofile\/people\/weblogic",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/weblogic\/memberOf\/
Administrators"
},
{
"group-uri":
{
"guid":"7CF83A81724811E1BFB5AB6A1E4E415B",
"description":"EnvAdminGroup",
"name":"OAAMEnvAdminGroup",
"commonname":"OAAMEnvAdminGroup",
"uniquename":"7CF83A81724811E1BFB5AB6A1E4E415B",
"uri":"\/idaas_rest\/rest\/userprofile\/groups\/OAAMEnvAdminGroup"
},
"person-uri":"\/idaas_rest\/rest\/userprofile\/people\/weblogic",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/weblogic\/memberOf\/
OAAMEnvAdminGroup"
}],
"uri":"\/idaas_rest\/rest\/userprofile\/people\/weblogic\/memberOf?
pageSize=2&pagePos=0"}
prefetch問合せパラメータを使用して問合せを拡張し、問合せのサブジェクトであるユーザー、グループまたは関係にリンクされた属性のコレクションを取得します。複数の属性を指定するには、属性名のカンマ区切りリストを使用します。
次に例を示します。
.../people/alice?prefetch=attr1,attr2(b1,b2),attr3(b1,b2,b3)
prefetch問合せパラメータを指定しない場合、システムはリクエストされたURIのみを返します。
prefetch問合せパラメータは、ユーザー、グループまたは関係プロファイル操作で使用することはできますが、検索操作では使用できません。
したがって、次のようなインスタンス・リソースでprefetchを使用できます。
.../people/alice
.../groups/Admin
.../people/alice/memberOf/Admin
ただし、次のようなコレクション・リソースでprefetchを使用することはできません。
.../people
.../groups
.../people/alice/memberOf
この項では1つの例を示します。
この例は、デフォルトで返されるユーザー属性のフル・セットに加え、指定されたユーザーのマネージャ属性のコレクションを取得する方法を示しています。
curl -i --request GET "http://localhost:16191/idaas_rest/rest/userprofile/people/JohnD/ ?prefetch=manager"
{
"uid":"JohnD",
"manager":
{"elements":
[{
"report-uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD\/manager\/SusanS",
"manager-uri":
{
"uid":"SusanS",
"manager":"\/idaas_rest\/rest\/userprofile\/people\/SusanS\/manager",
"state":"CA",
"lastname":"Smith",
"firstname":"Susan",
"loginid":"SusanS",
"uniquename":"5B543C30790511E1AF41BD17BAB1A1C1",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/SusanS",
"country":"USA",
"guid":"5B543C30790511E1AF41BD17BAB1A1C1",
"title":"Sr]]. Director, Development ",
"name":"SusanS",
"commonname":"Susan Smith"
}
}],
"uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD\/manager
?pageSize=0&pagePos=-1"
},
"state":"CA",
"lastname":"Doe",
"firstname":"John",
"loginid":"JohnD",
"uniquename":"2F23AC90790511E1AF41BD17BAB1A1C1",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD",
"country":"USA",
"guid":"2F23AC90790511E1AF41BD17BAB1A1C1",
"title":"Director, Development ",
"name":"JohnD",
"commonname":"John Doe"}
{
"uid":"JohnD",
"manager":"\/idaas_rest\/rest\/userprofile\/people\/JohnD\/manager",
"state":"CA",
"lastname":"Doe",
"firstname":"John",
"loginid":"JohnD",
"uniquename":"2F23AC90790511E1AF41BD17BAB1A1C1",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD",
"country":"USA",
"guid":"2F23AC90790511E1AF41BD17BAB1A1C1",
"title":"Director, Development ",
"name":"JohnD",
"commonname":"John Doe"}
scope問合せパラメータを使用して、関係の検索でネストされたレベルの属性を取得します。
次に例を示します。
.../people/JohnD/manager?scope=toTop
scopeは、直接的な階層関係を持つ2つのエンティティ間(たとえば、2ユーザー間のmanager関係や、ユーザーとグループ間のmemberOf関係など)で検索が行われる場合に使用します。
scope問合せパラメータは、manager、reports、groupMemberOf、groupMembers、groupOwnerおよびgroupOwnerOfのユーザー・プロファイル・サービス標準エンティティで使用できます。
|
注意: Oracle Access Managementシステム管理コンソールでユーザー・プロファイル・サービス・プロバイダを編集することにより、toTopのscope属性値を構成します。ページの関係構成セクションで、再帰リクエストのスコープ列の値を編集します。詳細は、『Oracle Access Management管理者ガイド』のユーザー・プロファイル・サービス・プロバイダの編集または作成に関する項を参照してください。 |
この項では1つの例を示します。
この例は、scopeをtoTopに設定してmanager関係の検索を行う方法を示しています。
ユーザーJohnDの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/ -d
'{
"uid":"JohnD",
"title":"Director, Development ",
"state":"CA",
"lastname":"Doe",
"commonname":"John Doe ",
"firstname":"John",
"password":"secret12345",
"country":"USA"}'
ユーザーSusanSの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/ -d
'{
"uid":"SusanS",
"title":"Sr. Director, Development ",
"state":"CA",
"lastname":"Smith",
"commonname":"Susan Smith",
"firstname":"Susan",
"password":"12345secret",
"country":"USA"}'
ユーザーAlanCの作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/ -d
'{
"uid":"AlanC",
"title":"VP, Identity Management Development ",
"state":"CA",
"lastname":"Cooper",
"commonname":"Alan Cooper",
"firstname":"Alan",
"password":"welcome321",
"country":"USA"}'
JohnDとSusanSの間のmanager関係の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/JohnD/manager -d
'{
"report-uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD",
"manager-uri":"\/idaas_rest\/rest\/userprofile\/people\/SusanS"}'
SusanSとAlanCの間のmanager関係の作成
curl -H "Content-Type: application/json" --request POST
http://localhost:14100/idaas_rest/rest/userprofile/people/SusanS/manager -d
'{
"report-uri":"\/idaas_rest\/rest\/userprofile\/people\/SusanS",
"manager-uri":"\/idaas_rest\/rest\/userprofile\/people\/AlanC"}'
scope = toTopでのmanager関係の検索の実行
curl -i --request GET "http://localhost:14100/idaas_rest/rest/userprofile/people/ JohnD/manager/?scope=toTop&pagePos=0&pageSize=2"
{"next":
"\/idaas_rest\/rest\/userprofile\/people\/JohnD\/manager
?pageSize=2&scope=toTop&pagePos=1",
"elements":
[{
"report-uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD\/manager\/SusanS",
"manager-uri":
{
"uid":"SusanS",
"manager":"\/idaas_rest\/rest\/userprofile\/people\/SusanS\/manager",
"state":"CA",
"lastname":"Smith",
"firstname":"Susan",
"loginid":"SusanS",
"uniquename":"5B543C30790511E1AF41BD17BAB1A1C1",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/SusanS",
"country":"USA",
"guid":"5B543C30790511E1AF41BD17BAB1A1C1",
"title":"Sr. Director, Development ",
"name":"SusanS",
"commonname":"Susan Smith"
}
},
{
"report-uri":"\/idaas_rest\/rest\/userprofile\/people\/SusanS",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/SusanS\/manager\/AlanC",
"manager-uri":
{
"uid":"AlanC",
"guid":"31486BE0790611E1AF41BD17BAB1A1C1",
"title":"VP, Identity Management Development ",
"name":"AlanC",
"state":"CA",
"lastname":"Cooper",
"commonname":"Alan Cooper",
"loginid":"AlanC",
"firstname":"Alan",
"uniquename":"31486BE0790611E1AF41BD17BAB1A1C1",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/AlanC",
"country":"USA"
}
}],
"uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD\/manager
?pageSize=2&scope=toTop&pagePos=0"}
{"elements":
[{
"report-uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD\/manager\/SusanS",
"manager-uri":
{
"uid":"SusanS",
"manager":"\/idaas_rest\/rest\/userprofile\/people\/SusanS\/manager",
"state":"CA",
"lastname":"Smith",
"firstname":"Susan",
"loginid":"SusanS",
"uniquename":"5B543C30790511E1AF41BD17BAB1A1C1",
"uri":"\/idaas_rest\/rest\/userprofile\/people\/SusanS",
"country":"USA",
"guid":"5B543C30790511E1AF41BD17BAB1A1C1",
"title":"Sr. Director, Development ",
"name":"SusanS",
"commonname":"Susan Smith"
}
}],
"uri":"\/idaas_rest\/rest\/userprofile\/people\/JohnD\/manager
?pageSize=2&pagePos=0"}
この項の例は、RESTコールの進行を表しています。まずデバイス登録ハンドルが取得され、Mobile and Socialサーバーへの後続のコールで使用されて、ユーザーの認証、保護されたリソースへのアクセス権限の取得、およびユーザー・プロファイル・サービスとの対話が行われます。基本シーケンスは、(1)デバイス登録ハンドルの取得、(2)ユーザー・トークンの取得、(3)アクセス・トークンの取得となります。
|
注意: この項に示すRESTの例では、読みやすくするために、改行およびコード・ブロックのインデントを行っています。 |
この例は、iOSデバイス上のモバイルSSOエージェント・アプリケーションがMobile and Socialサーバーに送信するクライアント登録リクエスト・コールを示しています。
リクエスト
curl -H "Content-Type: application/json" --request POST
http://hostname.example.com:18001/idaas_rest/rest/mobilejwtauthentication/register
-H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain'
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"jdoe",
"X-Idaas-Rest-Subject-Password":"password123",
"X-Idaas-Rest-New-Token-Type-To-Create":"CLIENTREGHANDLE",
"deviceProfile":
{
"oracle:idm:claims:client:sdkversion":"11.1.2.0.0",
"hardwareIds":
{
"oracle:idm:claims:client:udid":"0e83ff56a12a9cf0c7",
"oracle:idm:claims:client:phonenumber":"1-650-555-1234",
"oracle:idm:claims:client:macaddress":"00-16-41-34-2C-A6",
"oracle:idm:claims:client:imei":"010113006310121"
},
"oracle:idm:claims:client:jailbroken":false,
"oracle:idm:claims:client:geolocation":"+40.689060,-74.044636",
"oracle:idm:claims:client:networktype":"PHONE_CARRIER",
"oracle:idm:claims:client:vpnenabled":false,
"oracle:idm:claims:client:ostype":"iPhone OS",
"oracle:idm:claims:client:phonecarriername":"AT&T",
"oracle:idm:claims:client:locale":"EN-US",
"oracle:idm:claims:client:osversion":"4.0"
}
"clientId":"OICSecurityApp"
}'
レスポンス
{"X-Idaas-Rest-Token-Value":"eyJ0b2tlblR...l9M=",
"X-Idaas-Rest-Token-Type":"CLIENTREGHANDLE",
"handles":
{"oaam.device":
{
"expirationTSInSec":1334423076,
"value":"20_7fe4bde3d448598c4cb8211d214b5eaded0620428c06061b1261644603717cd3"
},
"oaam.session":
{
"expirationTSInSec":1332955447,
"value":"18_2743f64c111cb6691ea18689317958192d748b191a4955851e43f40910079e9a"
}
}
}
リクエスト
curl -H "Content-Type: application/json" --request POST
http://hostname.example.com:18001/idaas_rest/rest/mobilejwtauthentication/register
-H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain'
-H 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="T0lDU2VjdXJ...Gw5TT0="'
-d
'{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"jdoe",
"X-Idaas-Rest-Subject-Password":"password123",
"X-Idaas-Rest-New-Token-Type-To-Create":"CLIENTREGHANDLE",
"deviceProfile":
{
"oracle:idm:claims:client:sdkversion":"11.1.2.0.0",
"hardwareIds":
{
"oracle:idm:claims:client:udid":"0e83ff56a12a9cf0c7",
"oracle:idm:claims:client:phonenumber":"1-650-555-1234",
"oracle:idm:claims:client:macaddress":"00-16-41-34-2C-A6",
"oracle:idm:claims:client:imei":"010113006310121"
},
"oracle:idm:claims:client:jailbroken":false,
"oracle:idm:claims:client:geolocation":"+40.689060,-74.044636",
"oracle:idm:claims:client:networktype":"PHONE_CARRIER",
"oracle:idm:claims:client:vpnenabled":false,
"oracle:idm:claims:client:ostype":"iPhone OS",
"oracle:idm:claims:client:phonecarriername":"AT&T",
"oracle:idm:claims:client:locale":"EN-US",
"oracle:idm:claims:client:osversion":"4.0"
}
"handles":
{"oaam.session":"18_2743f64c111cb6691ea18689317958192d748b191a4955851e43f40910079e9a",
"oaam.device":"20_7fe4bde3d448598c4cb8211d214b5eaded0620428c06061b1261644603717cd3"
},
"clientId":"WhitePageApp"
}'
レスポンス
{"X-Idaas-Rest-Token-Value":"eyJ0b2tlblR...Lyhko=",
"X-Idaas-Rest-Token-Type":"CLIENTREGHANDLE",
"handles":
{"oaam.device":
{
"expirationTSInSec":1334423298,
"value":"20_7fe4bde3d448598c4cb8211d214b5eaded0620428c06061b1261644603717cd3"
},
"oaam.session":
{
"expirationTSInSec":1332955669,
"value":"18_2743f64c111cb6691ea18689317958192d748b191a4955851e43f40910079e9a"
}
}
}
リクエスト
curl -H "Content-Type: application/json" --request POST
http://hostname.example.com:18001/idaas_rest/rest/mobilejwtauthentication/authenticate
-H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain'
-H 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="T0lDU2VjdXJpdHlBc...Fa00vOD0="'
-d
'{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"jdoe",
"X-Idaas-Rest-Subject-Password":"password123",
"X-Idaas-Rest-New-Token-Type-To-Create":"USERTOKEN",
"deviceProfile":
{
"oracle:idm:claims:client:sdkversion":"11.1.2.0.0",
"hardwareIds":
{
"oracle:idm:claims:client:udid":"0e83ff56a12a9cf0c7",
"oracle:idm:claims:client:phonenumber":"1-650-555-1234",
"oracle:idm:claims:client:macaddress":"00-16-41-34-2C-A6",
"oracle:idm:claims:client:imei":"010113006310121"
},
"oracle:idm:claims:client:jailbroken":false,
"oracle:idm:claims:client:geolocation":"+40.689060,-74.044636",
"oracle:idm:claims:client:networktype":"PHONE_CARRIER",
"oracle:idm:claims:client:vpnenabled":false,
"oracle:idm:claims:client:ostype":"iPhone OS",
"oracle:idm:claims:client:phonecarriername":"AT&T",
"oracle:idm:claims:client:locale":"EN-US",
"oracle:idm:claims:client:osversion":"4.0"
}
"handles":
{"oaam.session":"21_9e2e728b3180a7a3c9b80cef542c58339c2c7ed0e1a3ba66db4807ef1cf1523d",
"oaam.device":"23_3a958d144b04f91c53b4236ed9f880357122df946f14ba21d957be5b49ef529b"
}
}'
レスポンス
{"X-Idaas-Rest-Token-Value":"eyJhbGciOiJSUzUx...1OC6qw",
"X-Idaas-Rest-Token-Type":"USERTOKEN",
"handles":
{"oaam.device":
{
"expirationTSInSec":1334424634,
"value":"23_3a958d144b04f91c53b4236ed9f880357122df946f14ba21d957be5b49ef529b"
},
"oaam.session":
{
"expirationTSInSec":1332957005,
"value":"21_9e2e728b3180a7a3c9b80cef542c58339c2c7ed0e1a3ba66db4807ef1cf1523d"
}
}
}
リクエスト
curl -H "Content-Type: application/json" --request POST
http://hostname.example.com:18001/idaas_rest/rest/mobilejwtauthentication/access
-H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain'
-H 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="T0lDU2VjdXJpdHlBc...TFPQzZxdw=="'
-d
'{
"X-Idaas-Rest-Subject-Type":"TOKEN",
"X-Idaas-Rest-Subject-Value":"eyJhbGciOiJSUzUxM...411OC6qw",
"X-Idaas-Rest-Application-Context":"<webgate context>",
"X-Idaas-Rest-Application-Resource":"http:\/\/am-v40z-04.us.example.com:7777\/index.html",
"X-Idaas-Rest-New-Token-Type-To-Create":"ACCESSTOKEN",
"deviceProfile":
{
"oracle:idm:claims:client:sdkversion":"11.1.2.0.0",
"hardwareIds":
{
"oracle:idm:claims:client:udid":"0e83ff56a12a9cf0c7",
"oracle:idm:claims:client:phonenumber":"1-650-555-1234",
"oracle:idm:claims:client:macaddress":"00-16-41-34-2C-A6",
"oracle:idm:claims:client:imei":"010113006310121"
},
"oracle:idm:claims:client:jailbroken":false,
"oracle:idm:claims:client:geolocation":"+40.689060,-74.044636",
"oracle:idm:claims:client:networktype":"PHONE_CARRIER",
"oracle:idm:claims:client:vpnenabled":false,
"oracle:idm:claims:client:ostype":"iPhone OS",
"oracle:idm:claims:client:phonecarriername":"AT&T",
"oracle:idm:claims:client:locale":"EN-US",
"oracle:idm:claims:client:osversion":"4.0"
}
"handles":
{"oaam.session":"21_9e2e728b3180a7a3c9b80cef542c58339c2c7ed0e1a3ba66db4807ef1cf1523d",
"oaam.device":"23_3a958d144b04f91c53b4236ed9f880357122df946f14ba21d957be5b49ef529b"
}
}'
リクエスト
curl -H "Content-Type: application/json" --request POST
http://hostname.example.com:18001/idaas_rest/rest/mobilejwtauthentication/authenticate
-H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain'
-H 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="T0lDU2VjdXJpdHlBc...TFPQzZxdw=="'
-d
'{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL"
"X-Idaas-Rest-Subject-Username":"jdoe",
"X-Idaas-Rest-Subject-Password":"password123",
"X-Idaas-Rest-New-Token-Type-To-Create":"USERTOKEN",
"OAM-Token-Type-To-Create":"USERTOKEN::OAMMT",
"deviceProfile":
{
"oracle:idm:claims:client:sdkversion":"11.1.2.0.0",
"hardwareIds":
{
"oracle:idm:claims:client:udid":"0e83ff56a12a9cf0c7",
"oracle:idm:claims:client:phonenumber":"1-650-555-1234",
"oracle:idm:claims:client:macaddress":"00-16-41-34-2C-A6",
"oracle:idm:claims:client:imei":"010113006310121"
},
"oracle:idm:claims:client:jailbroken":false,
"oracle:idm:claims:client:geolocation":"+40.689060,-74.044636",
"oracle:idm:claims:client:networktype":"PHONE_CARRIER",
"oracle:idm:claims:client:vpnenabled":false,
"oracle:idm:claims:client:ostype":"iPhone OS",
"oracle:idm:claims:client:phonecarriername":"AT&T",
"oracle:idm:claims:client:locale":"EN-US",
"oracle:idm:claims:client:osversion":"4.0"
}
"handles":
{"oaam.session":"21_9e2e728b3180a7a3c9b80cef542c58339c2c7ed0e1a3ba66db4807ef1cf1523d",
"oaam.device":"23_3a958d144b04f91c53b4236ed9f880357122df946f14ba21d957be5b49ef529b"
}
}'
ナレッジベース認証(KBA)は、ユーザーが少なくとも1つの質問に答えることを求められる認証スキームです。
デバイス登録リクエスト
curl -H "Content-Type: application/json" --request POST
http://server1.example.com:14100/
oic_rest/rest/mobileoamauthentication/register -H
'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain'
-d '{
"X-Idaas-Rest-New-Token-Type-To-Create":"CLIENTREGHANDLE",
"X-Idaas-Rest-Subject-Password":"password555",
"deviceProfile":
{
"oracle:idm:claims:client:sdkversion":"11.1.2.0.0","hardwareIds":
{
"oracle:idm:claims:client:udid":"0e83ff56a12a9cf0c7",
"oracle:idm:claims:client:phonenumber":"1-650-555-1234",
"oracle:idm:claims:client:macaddress":"00-16-41-34-2C-A6",
"oracle:idm:claims:client:imei":"010113006310121"
},
"oracle:idm:claims:client:jailbroken":false,
"oracle:idm:claims:client:geolocation":"+40.689060,-74.044636",
"oracle:idm:claims:client:networktype":"PHONE_CARRIER",
"oracle:idm:claims:client:vpnenabled":false,
"oracle:idm:claims:client:ostype":"iPhone OS",
"oracle:idm:claims:client:phonecarriername":"AT&T",
"oracle:idm:claims:client:locale":"EN-US",
"oracle:idm:claims:client:osversion":"4.0"
},
"X-Idaas-Rest-Subject-Username":"JohnS",
"clientId":"OICSSOApp",
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL"}'
KBA質問を含むレスポンス
{
"handles":
{
"oaam.device":
{
"expirationTSInSec":1352076952,
"value":"563_23552f26e974030dc160...c363d47a01918caf2f97"},
"oaam.session":
{
"expirationTSInSec":1350609323,
"value":"561_419dc5ee6b325535dd0...b73c74573a49dec233a"
},
"oic.multiStepAuthnSessionHandle":
{
"expirationTSInSec":1350606623,
"value":"eyJvcmlnU2VjdXJpdHlFdlsiU..1hclb2FtYXdGljYXRpb24ifQ=="
}
},
"message":"The Challenge Action is triggered",
"multi-step-challenge-question":
{
"challengeType":"KBA",
"locale":"en",
"questionRefId":"112",
"questionStr":"What was the year of your favorite sports moment?"
},
"oicErrorCode":"IDAAS-61010","status":"REQUIRE_MULTI_STEP_AUTHN"}
KBA回答を含むデバイス登録リクエスト
curl -H "Content-Type: application/json" --request POST
http://server1.example.com:14100/oic_rest/rest/mobileoamauthentication/register
-H 'X-IDAAS-SERVICEDOMAIN:MobileServiceDomain' -d
'{"X-Idaas-Rest-New-Token-Type-To-Create":"CLIENTREGHANDLE",
"X-Idaas-Rest-Subject-Password":"password555","deviceProfile":
{"oracle:idm:claims:client:sdkversion":"11.1.2.0.0","hardwareIds":
{"oracle:idm:claims:client:udid":"0e83ff56a12a9cf0c7",
"oracle:idm:claims:client:phonenumber":"1-650-555-1234",
"oracle:idm:claims:client:macaddress":"00-16-41-34-2C-A6",
"oracle:idm:claims:client:imei":"010113006310121"},
"oracle:idm:claims:client:jailbroken":false,
"oracle:idm:claims:client:geolocation":"+40.689060,-74.044636",
"oracle:idm:claims:client:networktype":"PHONE_CARRIER",
"oracle:idm:claims:client:vpnenabled":false,
"oracle:idm:claims:client:ostype":"iPhone OS",
"oracle:idm:claims:client:phonecarriername":"AT&T",
"oracle:idm:claims:client:locale":"EN-US",
"oracle:idm:claims:client:osversion":"4.0"},
"X-Idaas-Rest-Subject-Username":"JohnS","multi-step-challenge-answer":
{"challengeType":"KBA","locale":"EN-US","answerStr":
"moment","questionRefId":"112"},
"handles":{"oaam.session":"561_419dc5ee6b325535dd026c882ac67cabc271dd7e0297ab73c74573a49dec233a",
"oaam.device":"563_23552f26e974030dc16018cc6b76237432c363d47a019cec8c73aa318caf2f97",
"oic.multiStepAuthnSessionHandle":
"eyJvcmlnU2VjdXJpdHlFdmVudHMiOlsiUkVHX1NFQ1VSSVRZX0NMSUVOVF9BUFAiXSwib3JpZ1JlcU1hc
CI6eyJjbGllbnRJUEFkZHJlc3MiOiIxMC4xMzMuMTM5LjE0MyIsIlgtSWRhYXMtUmVzdC1TdWJqZWN0LVB
hc3N3b3JkIjoid2VsY29tZTEiLCJYLUlkYWFzLVJlc3QtTmV3LVRva2VuLVR5cGUtVG8tQ3JlYXRlIjoiQ
0xJRU5UUkVHSEFORExFIiwiWC1JZGFhcy1SZXN0LVN1YmplY3QtVXNlcm5hbWUiOiJKb2huUyIsImNsaWV
udElkIjoiT0lDU1NPQXBwIiwiWC1JZGFhcy1SZXN0LVN1YmplY3QtVHlwZSI6IlVTRVJDUkVERU5USUFMI
n0sImNvbnRyYWN0TmFtZSI6Ik1vYmlsZVNlcnZpY2VEb21haW4iLCJzZXJ2aWNlSWRFUCI6IlwvbW9iaWx
lb2FtYXV0aGVudGljYXRpb24ifQ=="},"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL"}'
クライアント登録ハンドルが含まれるレスポンス
{"X-Idaas-Rest-Token-Value":"eyJvcmFjbGU6aWRtOmNsYWltczpjbGllbnQ6c2RrdmVyc2lvbiI6I
jExLjEuMi4wLjAiLCJ0b2tlblR5cGUiOiJDTElFTlRSRUdIQU5ETEUiLCJvcmFjbGU6aWRtOmNsYWltczp
jbGllbnQ6bWFjYWRkcmVzcyI6IjAwLTE2LTQxLTM0LTJDLUE2IiwicmVnVXNlciI6IkpvaG5TIiwiaXNzI
joiTW9iaWxlT0FNQXV0aGVudGljYXRpb24iLCJvcmFjbGU6aWRtOmNsYWltczpjbGllbnQ6b3N0eXBlIjo
iaVBob25lIE9TIiwib3JhY2xlOmlkbTpjbGFpbXM6Y2xpZW50OmltZWkiOiIwMTAxMTMwMDYzMTAxMjEiL
CJyZWdUUyI6MTM1MDYwNTc4MCwianRpIjoiYTNlMWM1MjYtYjBjMS00ZDg0LThjYzAtZjYyMDNmYjM4NWV
lIiwib3JhY2xlOmlkbTpjbGFpbXM6Y2xpZW50Om9zdmVyc2lvbiI6IjQuMCIsImNsaWVudElkIjoiT0lDU
1NPQXBwIn0=.qA6Ez+gXNdLbk/hD5LRVDaBRK3t6b6IOOk7Z8iwW03s=",
"X-Idaas-Rest-Token-Type":"CLIENTREGHANDLE",
"handles":{"oaam.device":{"expirationTSInSec":1352077009,"value":"563_
23552f26e974030dc16018cc6b76237432c363d47a019cec8c73aa318caf2f97"},
"oaam.session":{"expirationTSInSec":1350609380,"value":"561_
419dc5ee6b325535dd026c882ac67cabc271dd7e0297ab73c74573a49dec233a"}}}
次の例に示すように、クライアントはテナント名を指定できます。
curl -H "Content-Type: application/json" ****-H "MY-MT-NAME: sales"****
--request POST http://localhost:18001/oic_rest/rest/jwtauthentication/authenticate
-d '{
"X-Idaas-Rest-Subject-Type":"USERCREDENTIAL",
"X-Idaas-Rest-Subject-Username":"profileid3",
"X-Idaas-Rest-Subject-Password":"clientpassword",
"X-Idaas-Rest-New-Token-Type-To-Create":"CLIENTTOKEN"}'
『Oracle Access Management管理者ガイド』のRESTクライアントによるテナント名指定の有効化に関する項も参照してください。
Mobile and Social REST APIのエラー・メッセージは、Oracle Fusion Middlewareエラー・メッセージ・リファレンスに記載されています。Mobile and Socialのメッセージには、「IDAAS」の接頭辞が付けられています。