Select to view content in your preferred language

How to handle authentication for inserting records into a Feature Table on AGOL from a java background service?

492
1
12-28-2022 09:03 AM
lochd
by
Emerging Contributor

Hi. I programmed successfully using JavaFX to insert records into a Feature table on AGOL. For authentication, I did use a OAuthTemporary Token from my ESRI developer dashboard.

Here is the issue:

I have a scheduled background service running (Not JavaFX). The task will be executed once a day at 12AM. In the task, I want to program to insert records into the Feature table on AGOL. I am having issues with ESRI authentication.

If in the task, I use an OAuth Temporary Token -> It will work fine, but the token is shorted live. I need to open my ESRI developer dashboard to obtain an active OAuthTemporary Token everytime the token I am using in my code get expired -> The authentication process will need human involved.

If in the task, I use an OAuth Client ID & Client Secret  -> The authentication process will need human involved.

Is there a way to renew an OAuth Temporary Token if it get expired? OR any solution to solve my issues?

Thank you!

0 Kudos
1 Reply
MarkBaird
Esri Regular Contributor

oAuth is intended to be used as a client side authentication technique for UI based applications where you authenticate yourself by typing in a username and password.

I'm going to consult with a colleague who is more knowledgeable  about security for what you are trying to achieve.

Would you describe the process you are running as a server side / backend process?

0 Kudos