Add a new OAuth Client
post
/oam/services/rest/ssa/api/v1/oauthpolicyadmin/client
Request
Supported Media Types
- application/json
OAuth Client that needs to be created
Root Schema : Client
Type:
Show Source
object
-
attributes:
array attributes
-
clientType:
string
Allowed Values:
[ "CONFIDENTIAL_CLIENT", "PUBLIC_CLIENT", "MOBILE_CLIENT" ]
Type of the client -
description:
string
-
grantTypes:
array grantTypes
-
id:
string
ClientID for the client. Will be auto generated if not specified
-
idDomain:
string
Name of the Identity Domain under which the Client exists
-
name:
string
Name of the Client
-
redirectURIs:
array redirectURIs
-
scopes:
array scopes
-
secret:
string
Password for the client if confidential
Nested Schema : attributes
Type:
Show Source
array
-
[0]:
object TokenAttributeSettings
Custom attributes that can be added to the Access Token
Nested Schema : grantTypes
Type:
Show Source
array
-
[0]:
string
Allowed Values:
[ "PASSWORD", "REFRESH_TOKEN", "JWT_BEARER", "CLIENT_CREDENTIALS", "AUTHORIZATION_CODE" ]
Nested Schema : TokenAttributeSettings
Type:
object
Custom attributes that can be added to the Access Token
Show Source
-
attrName:
string
Name of the custom attribute
-
attrType:
string
Allowed Values:
[ "STATIC", "DYNAMIC" ]
Type of the Attribute -
attrValue:
string
Value of the custom attribute. This could be a static value or a dynamic one that is evaluated and substituted.
Nested Schema : RedirectURI
Type:
Show Source
object
-
isHttps:
boolean
Default Value:
true
-
url:
string
Redirect URL
Response
Supported Media Types
- application/json
200 Response
Sucessfully created entity - OAuthClient, detail
Root Schema : Client
Type:
Show Source
object
-
attributes:
array attributes
-
clientType:
string
Allowed Values:
[ "CONFIDENTIAL_CLIENT", "PUBLIC_CLIENT", "MOBILE_CLIENT" ]
Type of the client -
description:
string
-
grantTypes:
array grantTypes
-
id:
string
ClientID for the client. Will be auto generated if not specified
-
idDomain:
string
Name of the Identity Domain under which the Client exists
-
name:
string
Name of the Client
-
redirectURIs:
array redirectURIs
-
scopes:
array scopes
-
secret:
string
Password for the client if confidential
Nested Schema : attributes
Type:
Show Source
array
-
[0]:
object TokenAttributeSettings
Custom attributes that can be added to the Access Token
Nested Schema : grantTypes
Type:
Show Source
array
-
[0]:
string
Allowed Values:
[ "PASSWORD", "REFRESH_TOKEN", "JWT_BEARER", "CLIENT_CREDENTIALS", "AUTHORIZATION_CODE" ]
Nested Schema : TokenAttributeSettings
Type:
object
Custom attributes that can be added to the Access Token
Show Source
-
attrName:
string
Name of the custom attribute
-
attrType:
string
Allowed Values:
[ "STATIC", "DYNAMIC" ]
Type of the Attribute -
attrValue:
string
Value of the custom attribute. This could be a static value or a dynamic one that is evaluated and substituted.
Nested Schema : RedirectURI
Type:
Show Source
object
-
isHttps:
boolean
Default Value:
true
-
url:
string
Redirect URL
422 Response
Failed to create OAuth entity "Client" - name "NameofClient"
Examples
This example demonstrates a sample request against the server for creating a new Client.
cURL Example
curl -i -H 'Content-Type: application/json' -H 'Authorization:Basic d2VibG9naWM6V2VsY29tZTE=' --request POST http:<AdminServerHost:Port>/oam/services/rest/ssa/api/v1/oauthpolicyadmin/client -d {"attributes":[{"attrName":"customeAttr1","attrValue":"CustomValue","attrType":"static"}],"secret":"welcome1","id":"TestClient","scopes":["ResServer1.scope1"],"clientType":"CONFIDENTIAL_CLIENT","idDomain":"TestDomain1", "description":"Client Description","name":"TestClient","grantTypes":["PASSWORD","CLIENT_CREDENTIALS","JWT_BEARER","REFRESH_TOKEN","AUTHORIZATION_CODE"],"defaultScope":"ResServer1.scope1","redirectURIs":[{"url":"http://localhost:8080/Sample.jsp","isHttps":true}]}
Example of Request Body
The following example shows the contents of the response body for creating a new Client in JSON format.
HTTP/1.1 200 OK Date: Thu, 27 Jul 2017 17:30:16 GMT Content-Length: 27 Content-Type: text/plain X-ORACLE-DMS-ECID: 78d30c19-07b6-4ac2-a39b-f1cbd8182ebb-0000012d X-ORACLE-DMS-RID: 0 Set-Cookie: JSESSIONID=4J2FGVVUN8MXI5vdemvJw3HFPHyraFXIDVRoRUZwc_7Uia_SOhG5!-1875566563; path=/; HttpOnly Sucessfully created entity - OAuthClient, detail...