Add a new OAuth Identity Domain

post

/oam/services/rest/ssa/api/v1/oauthpolicyadmin/oauthidentitydomain

Request

Supported Media Types
Body ()
Identity Domain that needs to be created
Root Schema : IdentityDomain
Type: object
Show Source
Nested Schema : tokenSetting
Type: array
Show Source
Nested Schema : TokenSettings
Type: object
Show Source

Response

Supported Media Types

200 Response

Sucessfully created entity - OAuthIdentityDomain, detail
Body ()
Root Schema : IdentityDomain
Type: object
Show Source
Nested Schema : tokenSetting
Type: array
Show Source
Nested Schema : TokenSettings
Type: object
Show Source

422 Response

Failed to create OAuth entity "IdentityDomain" - name "NameofIdentityDomain"

Examples

There are 2 ways to create the Identity Domain

  • Simple: In this mode, just the name and description of the IdentityDomain to be created are used. The rest of the values are defaulted.

  • Detailed: In this mode, you can give specific values to the different parameters.

cURL Example

This example demonstrates a sample request against the server for creating the Identity Domain in Simple mode.

curl -i -H 'Content-Type: application/json' -H 'Authorization:Basic d2VibG9naWM6V2VsY29tZTE=' 
--request POST http:<Servername>:<Port>/oam/services/rest/ssa/api/v1/oauthpolicyadmin/oauthidentitydomain -d 
'{"name":"TestDomain","description":"Test Domain"}' 

cURL Example

This example demonstrates a sample request against the server for creating the Identity Domain in Detailed mode.

curl -i -H 'Content-Type: application/json' -H 'Authorization:Basic d2VibG9naWM6V2VsY29tZTE='
--request POST http:<Servername>:<Port>/oam/services/rest/ssa/api/v1/oauthpolicyadmin/oauthidentitydomain -d 
'{"name":"TestDomain","identityProvider":"UserIdentityStore1","description":"Test Domain"}'

Example of Request Body

The following example shows the contents of the response body for creating the Identity Domain in Detailed mode in JSON format.

HTTP/1.1 200 OK
Date: Fri, 28 Jul 2017 13:01:41 GMT
Content-Length: 860
Content-Type: text/plain
X-ORACLE-DMS-ECID: 78d30c19-07b6-4ac2-a39b-f1cbd8182ebb-000003fd
X-ORACLE-DMS-RID: 0
Set-Cookie: JSESSIONID=_oGJSc7Vt2vIWLNQ_uwYCZz151JqOXewJRIkyvstnnio8WsNborT!-1875566563; path=/; HttpOnly

Sucessfully created entity - OAuthIdentityDomain, detail - OAuth Identity Domain :: 
Name - TestDomain, Id - 1636d0492f36447087780abdfdc4c15f, Description - Test Domain, 
TrustStore Identifiers - [TestDomain], Identity Provider - UserIdentityStore1, 
TokenSettings - [{"tokenType":"ACCESS_TOKEN","tokenExpiry":3600,"lifeCycleEnabled":false,
"refreshTokenEnabled":false,"refreshTokenExpiry":86400,"refreshTokenLifeCycleEnabled":false}, 
{"tokenType":"AUTHZ_CODE","tokenExpiry":3600,"lifeCycleEnabled":false,"refreshTokenEnabled":false,"refreshTokenExpiry":86400,"refreshTokenLifeCycleEnabled":false}, {"tokenType":"SSO_LINK_TOKEN","tokenExpiry":3600,"lifeCycleEnabled":false,"refreshTokenEnabled":false,"refreshTokenExpiry":86400,"refreshTokenLifeCycleEnabled":false}], 
ConsentPageURL - /oam/pages/consent.jsp, ErrorPageURL - /oam/pages/error.jsp, CustomAttrs - null