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
Back to Top

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"
Back to Top

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":"TestDomain","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}],"errorPageURL":"/oam/pages/error.jsp",
"consentPageURL":"/oam/pages/consent.jsp","customAttrs":"{\"domainCertValidityInDays\":\"30\", \"consentExpiryTimeInMinutes\":\"10\"}"}
'

Example of Response 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 - 0b5f3fd731e44ae09c5b8bd1f4cfc355, Description - TestDomain, 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 - {"domainCertValidityInDays":"30", "consentExpiryTimeInMinutes":"10"}
Back to Top