<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: app login and private content in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/app-login-and-private-content/m-p/184402#M892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eric, I have same question and I believe OP is correct. App login does not work with private content .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/authentication/limitations-of-application-authentication/" title="https://developers.arcgis.com/authentication/limitations-of-application-authentication/"&gt;Limitations of App Login | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;Currently ArcGIS Online does not provide a way to share Web Maps/Apps with external clients (non-AGO users) without sharing the content with&amp;nbsp;&lt;/SPAN&gt;&lt;EM style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;Everyone.&amp;nbsp;&lt;/EM&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;This is a much needed feature and has already been requested by many:&amp;nbsp;&lt;/SPAN&gt;&lt;A _jive_internal="true" data-saferedirecturl="https://www.google.com/url?hl=en&amp;amp;q=https://community.esri.com/ideas/11655-client-facing-password-for-shared-apps&amp;amp;source=gmail&amp;amp;ust=1478136783077000&amp;amp;usg=AFQjCNEEu_E57ZvdbH1cAbUokYhU0aRqJw" href="https://community.esri.com/ideas/11655-client-facing-password-for-shared-apps" style="color: #1155cc; background-color: #ffffff; font-size: 12.8px;" target="_blank"&gt;https://community.esri.com/ideas/11655-client-facing-password-for-shared-apps&lt;/A&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;I could not find a work around for this and will really appreciate if you can share how to make this happen.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Nov 2016 01:45:39 GMT</pubDate>
    <dc:creator>AkashJain1</dc:creator>
    <dc:date>2016-11-02T01:45:39Z</dc:date>
    <item>
      <title>app login and private content</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/app-login-and-private-content/m-p/184400#M890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to set up authentication for an app but I am not sure what I am trying to do is possible. The app will be used by users "who are unknown to the ArcGIS platform" so I need to implement an "app login". However, the service to be accessed will need to be private because of confidentiality concerns. From what I have read in the developer docs it sounds like this combination is not possible. I tried to put together some code to try anyhow. If what I am trying is not possible, some alternate ideas would be greatly appreciated. I assume the "easiest" route would be, since I need to keep the service private, to make the individuals using the app ArcGIS Online users. The issue is I do not know who these individuals will be and they will likely change. The "users" will be truck drivers that will carrying the devices in their trucks to record when they enter certain locations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have done so far:&lt;/P&gt;&lt;P&gt;1. Published a server with two layers (0: points, 1: polygons) which functions as expected.&lt;BR /&gt;2. Registered an app on developers.arcgis.com and acquired the Client ID and Client Secret.&lt;BR /&gt;3. Created a new role ("ThisRole") on ArcGIS Server Manager and added my username as a member (will have to change that at some point).&lt;BR /&gt;4. Made the service private and added "ThisRole" as the allowed role.&lt;BR /&gt;5. Added the code below to implement "app login".&lt;BR /&gt;6. Created a simple app to perform a QueryTask on a layer in the service to see if the app could acquire access.&lt;BR /&gt;7. Ran the app with the service public. QueryTask returned with correct query result.&lt;BR /&gt;8. Ran the app, multiple times, with the service private. QueryTask result was null.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have tried several variations of the code below. I am not completely sure which parameters are required and, for some, what the parameter value actually needs to be or where the value comes from. For example, I may be mixing user and app login parameters. I have been using the following resources:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fqt%2Fqml%2Fguide%2Fuse-oauth-2-0-authentication.htm" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/qt/qml/guide/use-oauth-2-0-authentication.htm&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fauthentication%2Faccessing-arcgis-online-services%2F" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/authentication/accessing-arcgis-online-services/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;App Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import QtQuick 2.3&lt;BR /&gt;import QtQuick.Controls 1.2&lt;BR /&gt;import ArcGIS.Runtime 10.26&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ApplicationWindow {&lt;BR /&gt; id: appWindow&lt;BR /&gt; width: 800&lt;BR /&gt; height: 600&lt;BR /&gt; title: "authentication"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;property string urlPolygonLayer: "url/to/feature/service/layer"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UserCredentials {&lt;BR /&gt; id: credentials&lt;BR /&gt; oAuthClientInfo: OAuthClientInfo {&lt;BR /&gt; clientId: "client_id_from_registered_app"&lt;BR /&gt; clientSecret: "client_secret_from_registered_app"&lt;BR /&gt; oAuthMode: Enums.OAuthModeApp&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Connections {&lt;BR /&gt; target: ArcGISRuntime.identityManager&lt;/P&gt;&lt;P&gt;onOAuthCodeRequired: {&lt;BR /&gt; console.log("onOAuthCodeRequired signal")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// ????? Not sure what authCode and authorizationUrl need to be. Tried a few times but no luck.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; // Access URL in the authorizationUrl property to obtain auth code&lt;BR /&gt; var authCode = …&lt;/P&gt;&lt;P&gt;// apply the auth code to the identity manager&lt;BR /&gt; ArcGISRuntime.identityManager.setOAuthCodeForUrl(authorizationUrl, authCode)&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QueryTask {&lt;BR /&gt; id: queryTask&lt;BR /&gt; url: urlPolygonLayer&lt;/P&gt;&lt;P&gt;onQueryTaskStatusChanged: {&lt;BR /&gt; console.log("onQueryTaskStatusChanged signal")&lt;/P&gt;&lt;P&gt;if (queryResult === null) {&lt;BR /&gt; console.log("Query result is null.")&lt;BR /&gt; } else {&lt;BR /&gt; console.log("Query result length: " + queryResult.graphics.length)&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Query {&lt;BR /&gt; id: query&lt;BR /&gt; where: "1=1"&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Component.onCompleted: {&lt;/P&gt;&lt;P&gt;// Add the credentials to the identity manager&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN&gt; // ????? Not sure what "some_url" is supposed to be here. I have used "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdomain.com%2Farcgis%2Frest" rel="nofollow" target="_blank"&gt;https://domain.com/arcgis/rest&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt; ArcGISRuntime.identityManager.setCredential(&lt;BR /&gt; credentials, some_url)&lt;/P&gt;&lt;P&gt;queryTask.execute(query)&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2016 19:42:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/app-login-and-private-content/m-p/184400#M890</guid>
      <dc:creator>JoshuaDonato1</dc:creator>
      <dc:date>2016-10-20T19:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: app login and private content</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/app-login-and-private-content/m-p/184401#M891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, this is doable. You might be missing one thing: you'll need to create a Service Proxy URL for your app login to use, instead of directly going to the private service endpoint.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/authentication/working-with-proxies/" title="https://developers.arcgis.com/authentication/working-with-proxies/"&gt;Working with Proxy Services | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;- this may be a helpful resource for you to get started setting up a proxy, in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Nov 2016 22:01:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/app-login-and-private-content/m-p/184401#M891</guid>
      <dc:creator>EricBader</dc:creator>
      <dc:date>2016-11-01T22:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: app login and private content</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/app-login-and-private-content/m-p/184402#M892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eric, I have same question and I believe OP is correct. App login does not work with private content .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/authentication/limitations-of-application-authentication/" title="https://developers.arcgis.com/authentication/limitations-of-application-authentication/"&gt;Limitations of App Login | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;Currently ArcGIS Online does not provide a way to share Web Maps/Apps with external clients (non-AGO users) without sharing the content with&amp;nbsp;&lt;/SPAN&gt;&lt;EM style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;Everyone.&amp;nbsp;&lt;/EM&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;This is a much needed feature and has already been requested by many:&amp;nbsp;&lt;/SPAN&gt;&lt;A _jive_internal="true" data-saferedirecturl="https://www.google.com/url?hl=en&amp;amp;q=https://community.esri.com/ideas/11655-client-facing-password-for-shared-apps&amp;amp;source=gmail&amp;amp;ust=1478136783077000&amp;amp;usg=AFQjCNEEu_E57ZvdbH1cAbUokYhU0aRqJw" href="https://community.esri.com/ideas/11655-client-facing-password-for-shared-apps" style="color: #1155cc; background-color: #ffffff; font-size: 12.8px;" target="_blank"&gt;https://community.esri.com/ideas/11655-client-facing-password-for-shared-apps&lt;/A&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: 12.8px;"&gt;I could not find a work around for this and will really appreciate if you can share how to make this happen.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 01:45:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/app-login-and-private-content/m-p/184402#M892</guid>
      <dc:creator>AkashJain1</dc:creator>
      <dc:date>2016-11-02T01:45:39Z</dc:date>
    </item>
  </channel>
</rss>

