refresh token

726
3
01-28-2019 09:47 PM
lirong
by
New Contributor

I used ArcGIS runtime SDK for iOS and get the access token and the refresh token. I want to know the expiration time of the refresh token. Does anyone know this?

Tags (1)
0 Kudos
3 Replies
MarkDostal
Esri Contributor

You can use the AGSOAuthConfiguration refreshTokenExpirationInterval property which is defined as: "

The requested expiration interval (in minutes) for the refreshToken generated by the

 OAuth request. The max interval can be overridden by the portal administrator.

 NOTE: For a permanent refreshToken (if the portal supports it), use -1.

"

If that doesn't answer your question, can you provide the following information?

- ArcGIS Runtime SDK for iOS version number (100.4, 100.3, etc)

- How are you getting the refresh Token?

- What kind of authentication are you using.

Thanks,

Mark

0 Kudos
lirong
by
New Contributor

Thank you Mark! You mean I can set the time in my code like below, and this means I don't need to acquire refresh token anymore?

        config.refreshTokenExpirationInterval = -1

0 Kudos
MarkDostal
Esri Contributor

Correct.  If the refresh token is set to -1, then the SDK will handle refreshing the token so you don't have to.  ArcGIS Online and Portal version > 1.6 support this functionality.  If you're not using AGOL and have an older Portal, then the refreshTokenExpirationInterval is not supported.

Let me know if you have any more questions,

Mark

0 Kudos