- REST API for Oracle Web Services ManagerREST API for Oracle Web Services Manager
- Use Cases
- Manage Token Issuer Trust Document
Manage Token Issuer Trust Document
You can view and manage token issuer trust using the REST APIs.
http(s)://host:port/wsm-pmrest/v2/trust
The following use case shows you how to:
-
Create a new token issuer trust document
-
Modify the token issuer trust document
-
View the token issuer trust document
-
Delete the token issuer trust document
To manage the token issuer trust document:
- Specify the headers on the cURL command line:
-H Accept:application/json
- Create a trust document
myTrustDocument
by running the following command:Note:
To define the token attribute rules and add the trusted token issuer, see Manage the Token Attribute Rules and Manage the Trusted Token Issuer.curl -i -X POST -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust
Example
curl -i -X POST -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust
See Create Trust(s).
The following shows an example of the request body.
[ { "trustname": "myTrustDocument" } ]
The following shows an example of the response indicating the request succeeded.
{ "STATUSCODE": "20051", "MESSAGE": "Trusts \"[myTrustDocument]\" are successfully created." }
- Modify the
myTrustDocument
trusted issuer document to add the display nameTrustDocument
by running the following command:curl -i -X PATCH -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust
Example
curl -i -X PATCH -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust
See Update Trust(s).
The following shows an example of the request body.
[ { "trustname": "myTrustDocument", "displayname": "TrustDocument" } ]
The following shows an example of the response indicating the request succeeded.
{ "STATUSCODE": "20052", "MESSAGE": "Trusts \"[myTrustDocument]\" are successfully updated." }
- View the trust names and display names of all the trusted issuer documents in the repository.
curl -i -X GET -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/?detail={true/false}
Example
curl -i -X GET -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/?detail=true
See Get All Trust(s).
The following shows an example of the response body after providing the query parameter
?detail=true
:[ { "trustname": "myTrustDocument", "displayname": "TrustDocument" }, { "trustname": "owsm-trust-doc", "displayname": "owsm-trust-doc" }, { "trustname": "tokenIssuertrustWLS_server_domain", "displayname": "wls_owsm_server_domain_trust_document" }, { "trustname": "tokenIssuertrust_test", "displayname": "tokenIssuertrust_test" }, { "trustname": "oracle-default", "displayname": "i18n:oracle.wsm.resources.resdesc.ResourceDescriptionBundle_property-TokenIssuerTrust_displayName" } ]
- View the configuration details for
myTrustDocument
trusted issuer document 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/{TrustDocName}
Example
curl -i -X GET -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument
See Get a Trust.
The following shows an example of the response body:
{ "trustname": "myTrustDocument", "displayname": "TrustDocument" }
- You can delete the
myTrustDocument
trusted issuer document from the repository by running the following command:curl -i -X DELETE -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustname}
Example
curl -i -X DELETE -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument
See Delete a Trust and Delete All Trust.
The following shows an example of the response indicating the request succeeded.
{ "STATUSCODE": "20054", "MESSAGE": "Following Trust(s) are successfully deleted: [myTrustDocument]" }