Skip to main content
Solved

IFS Rest Api call using OAuth 2.0 in Apps10UPD19

  • September 16, 2024
  • 2 replies
  • 284 views

Forum|alt.badge.img+6
  • Sidekick (Employee)
  • 22 replies

Hi,

I would like to call a IFS Rest Api for an interface in Aurena Apps10UPD19.

It should be a connection with OAuth 2.0 authentication using client_id and client_secret.

 

I was able to set up Postman to get the token

But when I do the call it always returns Error 401

I can also retreive the token like that:

If I try with to connect using basic Auth it works without any problem.

Has someone a solution to do this call in OAuth2 with Postman or any other tool.

Thank you

Fabrice

Best answer by dsj

In the configure token, add Token Request parameter named “resource” and set the Client ID as the value.

 

Otherwise, you need to use the obtained ID token as the Access token.

Explanation for this can be found in my blog post below :)

https://dsj23.me/2021/01/08/ifs-authentication-flow-with-oauth-and-openid-connect/

 

Hope it helps!

Damith

View original
Did this topic help you find an answer to your question?

2 replies

dsj
Superhero (Partner)
Forum|alt.badge.img+22
  • Superhero (Partner)
  • 836 replies
  • Answer
  • September 16, 2024

In the configure token, add Token Request parameter named “resource” and set the Client ID as the value.

 

Otherwise, you need to use the obtained ID token as the Access token.

Explanation for this can be found in my blog post below :)

https://dsj23.me/2021/01/08/ifs-authentication-flow-with-oauth-and-openid-connect/

 

Hope it helps!

Damith


Dharmendra
Hero (Employee)
Forum|alt.badge.img+6
  • Hero (Employee)
  • 46 replies
  • September 16, 2024

Hi @Fabrice ,

 

Hope this will help you in API Rest integration. If you may refer KBA-KB0050676 as well.

 

Authorization for OAuth mode (Recommended and secured method to use IFS Api endpoints)

When it comes to the OAuth mode there are few more steps to configure the Postman (demonstrated by IFS cloud as Aurina client application's Api specification not properly documented for OAuth steps).

 

Set authorization information in the Postman as follows:
 

Type – Oauth 2.0

Token Name - <add a preferred name>
Header Prefix: Bearer

Grant type – Authorization Code

Callback URL - https://oauth.pstmn.io/v1/browser-callback(same URL added in the IAM client window)

Auth URL - <autherization_endpoint value from step 2>

Access Token URL - <token_endpoint value from step 2>

Client ID - <Client ID from the IAM client window for the selected client from step 3>

Client Secret - <Client Secret from the IAM client window for the selected client from step 3>

Scope - openid

 


Step 1:
Go to the API specification JSON and find the section - 'securitySchemes'. There you will be find a URL as 'openIdConnectUrl' navigate to that URL

Step 2:
There you will be find OpenId configuration values which are needed to setup OpenId authorization in the postman
Step 3:

Navigate to IAM Clients window in the application and Create a new client or an existing appropriate client to use << Add the below URL to the Redirect Uri if it does not exist: https://oauth.pstmn.io/v1/browser-callback »

Let me know if you still have any issues in API integrations. Thank you.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings