Skip to main content
Question

OAuth2 web service - grant_type


thaverkort
Contributor
Forum|alt.badge.img+8

Hi Folks,

 

I'm setting up a HTML web connection to an API using OAuth2, and one of the parameters that I must specify is grant_type=client_credentials. However, in the 'Retrieve Token Parameters' dialog in the preview window, I see that grant_type=authorization_code. Is there any way to change this? If I enter it in the URL section, will it overwrite (even if it doesn't show the change in the preview)?

 

Thanks!

Tyson

6 replies

Forum|alt.badge.img

Hi @thaverkort,

Currently, only the grant_type authorization_code is supported for the OAuth 2.0 Web Service definitions.

Did you try the Token service? This might work because the flow is quite similar to the one described with grant_type=client_credentials.

Also if this is a public API feel free to share the documentation here then other community can try or comment in case they tried this already.

I hope this helps!


  • February 23, 2022

Hello, would it be possible to know if there is any plan in the future to force the grant_type to client_credentials in the Auth 2.0 Web Connection? The token Service does not allow to put the client_id/client_secret as in the Auth 2.0 or I did not find it. Thx for your help. Regards. Eric


fran-gd
Contributor
Forum|alt.badge.img
  • Contributor
  • December 9, 2022

Hi,

 

Any update on this? It would be nice if FME would support the client_credentials OAuth2 grant flow. Specially for FME server.


mattmatsafe
Safer
Forum|alt.badge.img+13
  • Safer
  • December 13, 2022

Hello @fran-gd​ ,

There are no plans to add the client_credentials OAuth 2.0 grant type at the moment. You should be able to create a token service if you wish to use this grant type and provide the credentials the service requires in the Request Data. Using ArcGIS Online as an example:

client_credentialsWhile this approach works well on Workbench, there is a known issue where a new token is not fetched after expiry on FME Server. If you cannot use an Oauth 2 web service, then you need to use an HTTPCaller to fetch a new token.


fran-gd
Contributor
Forum|alt.badge.img
  • Contributor
  • December 15, 2022

Hi @mattmatsafe​ ,

 

Thanks for your reply and the way around.

I am afraid we are using FME Server 2022, so there is no other way around than mimic the workflow manually with a custom transformer. Anyway it is good to know that we can use the token service once the problem is fixed.

It seems the link to the issue is broken so I paste below the details page, just in case other users face the same issue:

FMESERVER-19419 : Link to details site

 

Thanks again for the clarification! 😊


mattmatsafe
Safer
Forum|alt.badge.img+13
  • Safer
  • December 15, 2022
fran-gd wrote:

Hi @mattmatsafe​ ,

 

Thanks for your reply and the way around.

I am afraid we are using FME Server 2022, so there is no other way around than mimic the workflow manually with a custom transformer. Anyway it is good to know that we can use the token service once the problem is fixed.

It seems the link to the issue is broken so I paste below the details page, just in case other users face the same issue:

FMESERVER-19419 : Link to details site

 

Thanks again for the clarification! 😊

You're welcome; sorry there isn't a better solution at the moment.

Thanks for letting me know about the broken link! I've edited my post to fix that.


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