Code Monkey home page Code Monkey logo

torii-provider-arcgis's People

Contributors

dbouwman avatar drewdaemon avatar ember-tomster avatar mjuniper avatar tomwayson avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

torii-provider-arcgis's Issues

fetch and 302 redirects and POST

In debugging an issue with Portal, the backing system was setup so that http requests to the api would be 302'd to https requests.

It seems like fetch would follow the 302, but was not smart enough to send the same body if the first request was a POST. Rather, it would send a GET, w/o the f=json&token=34b2js... and that would return the html, which would ๐Ÿ’ฃ the app.

I propose we change that call to force a GET --> return arcgisRest.request(userUrl, { authentication: authMgr, httpMethod: 'GET' });

Still checking if this is a Portal/Enterprise thing, or something unique to this one env. If the latter, we may not need this, but should still consider looking into why the 302 is respected, but the form is not re-sent.

Use ArcGIS-Rest-Js

Ember Issues:

  • after importing both arcgis-rest-auth and arcgis-rest-request we only see arcgis-rest-auth in vendor.js
  • after importing either of them, the build time jumps to ~5 minutes... I suspect it's because we are minifiying already minified code.

ArcGIS Rest Issues

  • can we also ship un-minified umd output?
  • UserSession.beginOAuth2 does not support the following:
    • passing additional flags - showSocialLogins, display
    • specifying pop-up window size
  • Ergonomics of UserSession.completeOAuth2 - more a general thing.

Notes

UserSession.completeOAuth2

This requires use to use arcgis-rest-js within theredirect.html file, as well as getting the clientId into that context. Given that we can/have been doing this with ~4 lines of javascript in the <head> of redirect.html, this seems like overkill.

If UserSession.beginOAuth2 could register the callback with a consistent name - i.e. window['__ESRI_REST_AUTH_HANDLER'] instead of window['__ESRI_REST_AUTH_HANDLER_${clientid}'] this would greatly simplify things.

Regardless, we can't use this in torii-provider-arcgis because we need to use the mechanism provided by torii.

Session Mixin (gatekeeper.js) .orgPortalUrl for Non-Auth'd Session

To centralize the logic for getting the correct portal url, have the session mixin be able to return a correct portalUrl (based on ENV.APP.arcgisPortal settings) for non-authenticated sessions.

Keep the current logic (using the portalUrl from the cookie/portal-self call) for Auth'd users.

apiKey --> clientId

We should deprecate the use of apiKey and switch to clientId.

This is more consistent with the url param in the AOG request, and aligned with oAuth terminology

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.