Download presentation
Presentation is loading. Please wait.
Published byPreston Taylor Modified over 9 years ago
1
Esri UC 2014 | Demo Theater | Using ArcGIS Online App Logins in Node.js James Tedrick
2
Esri UC 2014 | Demo Theater | ArcGIS Online – OAuth Logins Differentiates between application server, authentication server Authentication server logs user in, checks for user acceptance of application Application server does not see username/password as they are entered Application does get access token after authorization
3
Esri UC 2014 | Demo Theater | ArcGIS Online – OAuth Logins User Logins – login to a user’s account - User must have ArcGIS Online login - Access user’s items - Use user’s organization credits for tasks - Web App, Mobile Device, Server login Application Logins – login with your (developer) account - User’s don’t need to have ArcGIS Online login (but you need to control access) - Access your items - Use your credits for tasks - Server login only Using ArcGIS Online App Logins in Node.js
4
Esri UC 2014 | Demo Theater | OAuth login key properties redirect_uri – resource to load when presenting new credentials Client ID / appId – unique ID of application in ArcGIS Online Client Secret / appSecret – secret key used with appId (appId’s ‘password’)
5
Esri UC 2014 | Demo Theater | Why Server Logins? Your application provides value via custom server-side resources - Access private data via your server - Apply custom analysis to user’s data You want to manage the user relationship - Use your credits for tasks for customers - Consolidate customer billing with you Using ArcGIS Online App Logins in Node.js ArcGIS Online Your Proprietary Data & Analysis Your Users & App
6
Esri UC 2014 | Demo Theater | Node – What? & Why? Node.js – Use a JavaScript runtime as a server application environment Familiar language – like my web apps Asynchronous programming pattern – like my web apps Deployable in a variety of contexts (server, cloud) Strong developer community Many additional modules with easy install/update http://nodejs.org Using ArcGIS Online App Logins in Node.js
7
Esri UC 2014 | Demo Theater | App Logins Using ArcGIS Online App Logins in Node.js
8
Esri UC 2014 | Demo Theater | 4.Client requests an operation that makes use of AGO resources 5.Server requests resources with token 6.ArcGIS Online provides response 7.Possible further processing; response is delivered to client Application Login ArcGIS Online Your application server 1.Application requests authorization by opening https://www.arcgis.com/sharing/oauth2/token (normally done at server startup) https://www.arcgis.com/sharing/oauth2/token 2.ArcGIS Online provides a token 3.Application loads into client 7 4 1 2 5 6 3 Using ArcGIS Online App Logins in Node.js
9
Esri UC 2014 | Demo Theater | App Logins Using ArcGIS Online App Logins in Node.js
10
Esri UC 2014 | Demo Theater | User Logins Using ArcGIS Online App Logins in Node.js
11
Esri UC 2014 | Demo Theater | 5.Login system redirects browser, providing authorization code as uri parameter 6.Server gets authorization code from uri 7.Application requests access token from AGO https://www.arcgis.com/sharing/outh2/token https://www.arcgis.com/sharing/outh2/token 8.AGO provides token User Login – Server Applications ArcGIS Online Your application server Identity Management 1.Application loads into client 2.Application requests authorization by opening https://www.arcgis.com/sharing/oauth2/authorize https://www.arcgis.com/sharing/oauth2/authorize 3.ArcGIS Online redirects to organization login page 4.User logs in using login system 2 4 5 1 6 7 8 3 Using ArcGIS Online App Logins in Node.js
12
Esri UC 2014 | Demo Theater | User Logins Using ArcGIS Online App Logins in Node.js
13
Esri UC 2014 | Demo Theater | This demo: https://github.com/tedrick/agoServerLoginExamplehttps://github.com/tedrick/agoServerLoginExample ArcGIS for Developer OAuth documentation: https://developers.arcgis.com/authentication/index.html https://developers.arcgis.com/authentication/index.html Check language specific documentation at http://developers.arcgis.comhttp://developers.arcgis.com Node.js – http://nodjs.orghttp://nodjs.org - Request module (HTTP) – https://github.com/mikeal/requesthttps://github.com/mikeal/request - Jade Template language – http://jade-lang.com/http://jade-lang.com/ - iisnode: Run node apps via IIS – https://github.com/tjanczuk/iisnodehttps://github.com/tjanczuk/iisnode Resources Using ArcGIS Online App Logins in Node.js
14
Esri UC 2014 | Demo Theater | Thank you… Please fill out the session survey: Offering ID: 2134 Online – www.esri.com/ucsessionsurveyswww.esri.com/ucsessionsurveys Related Sessions (Thursday): - ArcGIS Online: Security Aspects 10:00 – 10:30 General Theater 1, Hall A - Securing your Portal for ArcGIS 1:30 – 2:45 Room 4 Using ArcGIS Online App Logins in Node.js
15
Esri UC 2014 | Demo Theater | Using ArcGIS Online App Logins in Node.js
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.