Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Create an OAuth Client: XML and JSON Examples 


XML

JSON

Example Request
Expand
titleXML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<oauthClient retainSysIds="true">
    <clientId>client_id</clientId>
    <clientSecret>client_secret</clientSecret>
    <clusterRedirectUrls>
        <clusterRedirectUrl>
            <clusterNode>node1:8080-uc</clusterNode>
           
<redirectUrl>http://localhost:8080/uc/oauth2/callback</redirectUrl>
        </clusterRedirectUrl>
    </clusterRedirectUrls>
    <description>description</description>
    <name>Google</name>
    <opswiseGroups/>
    <provider>Google</provider>
    <scopes>
        <scope>https://mail.google.com</scope>
    </scopes>
    <sysId>239119555c2c427f8f5b29faeecfdc27</sysId>

</oauthClient>
Expand
titleJSON
{
    "clientId": "client_id",
    "clientSecret": "client_secret",
"

    "clusterRedirectUrls": [
        {
          
"clusterNode": "node1:8080-uc",

          "redirectUrl":
"htttp://localhost:8080/uc/oauth2/callback"
        }
    ],
    "description": "description",
    "name": "Google
OAuth Client
",
    "opswiseGroups": [],
    "provider": "Google",
    "retainSysIds": true,
    "scopes": [
        "https://mail.google.com"
    ],
    "sysId": "239119555c2c427f8f5b29faeecfdc27"
,

}

Modify an OAuth Client 


 Description

URI

http://host_name/uc/resources/oauthclient

HTTP Method

PUT

Description

Modifies an OAuth Client.

Example URI

http://localhost:8080/uc/resources/oauthclient

Authentication

HTTP Basic

Produces Content-Type

n/a

Consumes Content-Type

application/xml, application/json

Example Responses

  • Status 200

    • Successfully updated the OAuth Client with id {uuid}.

  • Status 400

    • Error message.

  • Status 403

    • Operation prohibited due to security constraints.

  • Status 404

    • An OAuth Client with name “{name}” does not exist.

    • An OAuth Client with id "{uuid}" does not exist.

  • Status 500

    • Unexpected request failure. See log(s) for more details.

...