信頼できるトークン発行者のリライイング・パーティの構成

トークン発行者REST APIを使用して、信頼できるトークン発行者のリライイング・パーティを表示および管理できます。

cURLコマンドの例では、URL構造を使用しています:
http(s)://host:port/wsm-pmrest/v2/trust/issuer/tokentype/relyingparty

次の方法を使用事例で示します。

  • リライイング・パーティの作成

  • リライイング・パーティの表示

  • リライイング・パーティの削除

リライイング・パーティを管理するには:

  1. cURLコマンド・ラインでヘッダーを指定します。
    -H Accept:application/json
  2. 次のコマンドを実行して、トークン・タイプが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."
    }
  3. 次のコマンドを実行して、リポジトリ内の発行者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"
        }
    ]
  4. 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"
      }
    ]
  5. オプションで、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]"
    }