How to access to secured services in API v 100.4

448
3
02-04-2019 09:43 AM
EvelynHernandez
Occasional Contributor III

Hello there,

Im wondering if there is any example on how to access to a secured rest service using the latest API.

I hope guys u can help me on that.

Thanks in advice!

Tags (1)
0 Kudos
3 Replies
GarimaDhakal
New Contributor III

Hello,

Can you please describe your workflow so that we can point you in the right direction? What type of secure service are you trying to consume using ArcGIS runtime SDK for iOS 100.4.0? What issue have you run into when consuming the secure service? 

Thank you,

Garima

0 Kudos
EvelynHernandez
Occasional Contributor III

We want to make a query in a secured rest service and we dont know  how to afford it , like any example on how to log in and pass the credentials and then make a query to get results.

0 Kudos
GarimaDhakal
New Contributor III

You can use AGSAuthenticationManager class that allows you to manage authentication/security related events in order to access secure resources. We also have a recording of the session, Authentication For iOS Apps Made Easy from Developer Summit 2017 that introduces Authentication Manager in ArcGIS runtime SDK for iOS. The session covers the topic of how to log in and pass the credentials to access secure service, and more. 

Here are some additional resources:

1. Authentication Manager.

2. Developer's lab that shows how to access services with OAuth 2.0. 

Once you are able to load the secure resource, you can perform query on a feature table as shown in the following samples. 

1. Query a map image sublayer.

2. Statistical query.

3. Feature layer query.

I hope this helps. Please feel free to let us know if you have further questions. 

Thank you,

Garima

0 Kudos