- Oracle Web Services Manager REST APIOracle Web Services Manager REST API
- ユース・ケース
- 信頼できるトークン発行者の管理
- 信頼できるトークン発行者のリライイング・パーティの構成
信頼できるトークン発行者のリライイング・パーティの構成
トークン発行者REST APIを使用して、信頼できるトークン発行者のリライイング・パーティを表示および管理できます。
cURLコマンドの例では、URL構造を使用しています:
http(s)://host:port/wsm-pmrest/v2/trust/issuer/tokentype/relyingparty
次の方法を使用事例で示します。
-
リライイング・パーティの作成
-
リライイング・パーティの表示
-
リライイング・パーティの削除
リライイング・パーティを管理するには:
- cURLコマンド・ラインでヘッダーを指定します。
-H Accept:application/json
- 次のコマンドを実行して、トークン・タイプが
jwt
の発行者www.example.com
の2つのリライイング・パーティを、信頼できる発行者ドキュメントmyTrustDocument
に追加します:curl -i -X POST -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustname}/issuer/{issuername}/{tokentype}/relyingparty
例
curl -i -X POST -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/issuer/www.example.com/jwt/relyingparty
「RelyingPartyの追加」を参照してください。
次に、リクエスト本文の例を示します。
[ { "rptype": "csfkey", "rpvalue": "basic.credentials" }, { "rptype": "literal", "rpvalue": "client" } ]
次にリクエストの成功を示すレスポンスの例を示します。
{ "STATUSCODE": "20091", "MESSAGE": "RelyingParty \"[rptype:csfkey, rpvalue:basic.credentials, rptype:literal, rpvalue:client]\" is successfully created." }
- 次のコマンドを実行して、リポジトリ内の発行者
www.example.com
のリライイング・パーティの詳細を表示します:curl -i -X GET -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustname}/issuer/{issuername}/{tokentype}/relyingparty?rptype={ReplyingPartyType)&rpvalue={ReplyingPartyValue}
例
curl -i -X GET -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/issuer/www.example.com/jwt/relyingparty
「RelyingPartyの取得」を参照してください。
次に、レスポンス本文の例を示します:
[ { "rptype": "csfkey", "rpvalue": "basic.credentials" }, { "rptype": "literal", "rpvalue": "client" } ]
rptype
およびrpvalue
の問合せパラメータを指定して、発行者www.example.com
のリライイング・パーティの詳細を表示します:curl -i -X GET -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustname}/issuer/{issuername}/{tokentype}/relyingparty?rptype={ReplyingPartyType)&rpvalue={ReplyingPartyValue}
例
curl -i -X GET -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/issuer/www.example.com/jwt/relyingparty?rptype=csfkey&rpvalue=basic.credentials
「RelyingPartyの取得」を参照してください。
次に、レスポンス本文の例を示します:
[ { "rptype": "csfkey", "rpvalue": "basic.credentials" } ]
- オプションで、
rptype
およびrpvalue
の問合せパラメータを指定して、発行者www.example.com
のリライイング・パーティを削除します:curl -i -X DELETE -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustname}/issuer/{issuername}/{tokentype}/relyingparty?rptype={ReplyingPartyType)&rpvalue={ReplyingPartyValue}
例
curl -i -X DELETE -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/issuer/www.example.com/jwt/relyingparty?rptype=literal&rpvalue=client
「RelyingPartyの削除」を参照してください。
次にリクエストの成功を示すレスポンスの例を示します。
{ "STATUSCODE": "20094", "MESSAGE": "Following RelyingParty(s) are successfully deleted: [rptype:literal, rpvalue:client]" }