Tuesday, July 25, 2023

#978 OIC3 OAuth with OCI Domains

This is very similar to the process with IDCS. When you create an OIC3 instance under domains, you see an application has been created under Oracle Cloud Services. In my case, for my new OIC3 instance called ruck3.


Now I create a Confidential Application - my OAuth app for this ruck3 OIC instance.


The app is configured as follows -


Nothing required here - 


OAuth configuration is as follows - 















I add the resources from the Oracle Cloud Services app, created for my OIC3 instance -




   


As you can see, I have also assigned this add to the Service Developer role of the OIC Oracle Services app.


This I did here - 


Now to the OIC instance, I have 1 integration here - 


Let's invoke this from Postman - 

Firstly, the OAuth setup - 


Note, Grant Type is set to Client Credentials.

Access Token URL is in the following format - https://yourIDCSURL/oauth2/v1/token

The idcs url can be found here - 



















Client ID and Client Secret you get from the confidential app you just created.


For Scope, just add the 2 scopes you added to the Confidential App - separated by a space.

 

Get the access token -

Send the request to OIC - 



No comments: