You can view and manage the relying party for the trusted token
issuer using the Token Issuer REST API.
The cURL command examples use the URL
structure:
http(s)://host:port/wsm-pmrest/v2/trust/issuer/tokentype/relyingparty
The following use case shows you how to:
-
Create the relying party
-
View the relying party
-
Delete the relying party
To manage the relying party:
- Specify the headers on the cURL command line:
-H Accept:application/json
- Add two replying parties for the issuer
www.example.com
with the token type
jwt
to the trusted issuer document
myTrustDocument
by running the
following command:
curl -i -X POST -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustname}/issuer/{issuername}/{tokentype}/relyingparty
Example
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
See Add RelyingParty(s).
The following shows an example of the
request body.
[
{
"rptype": "csfkey",
"rpvalue": "basic.credentials"
},
{
"rptype": "literal",
"rpvalue": "client"
}
]
The following shows an example of the
response indicating the request succeeded.
{
"STATUSCODE": "20091",
"MESSAGE": "RelyingParty \"[rptype:csfkey, rpvalue:basic.credentials, rptype:literal, rpvalue:client]\" is successfully created."
}
- View the details of replying parties for the issuer
www.example.com
in the repository
by running the following command:
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}
Example
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
See Get RelyingParty(s).
The following shows an example of the
response body:
[
{
"rptype": "csfkey",
"rpvalue": "basic.credentials"
},
{
"rptype": "literal",
"rpvalue": "client"
}
]
- View the details of replying party for the issuer
www.example.com
by specifying the
rptype
and rpvalue
query parameters:
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}
Example
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
See Get RelyingParty(s).
The following shows an example of the
response body:
[
{
"rptype": "csfkey",
"rpvalue": "basic.credentials"
}
]
- Optionally, delete the replying party for the issuer
www.example.com
by specifying the
rptype
and rpvalue
query parameters:
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}
Example
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
See Delete
RelyingParty(s).
The following shows an example of the
response indicating the request succeeded.
{
"STATUSCODE": "20094",
"MESSAGE": "Following RelyingParty(s) are successfully deleted: [rptype:literal, rpvalue:client]"
}