96 lines
6.1 KiB
JSON
96 lines
6.1 KiB
JSON
{
|
|
"_args": [
|
|
[
|
|
{
|
|
"raw": "winchan@0.1.4",
|
|
"scope": null,
|
|
"escapedName": "winchan",
|
|
"name": "winchan",
|
|
"rawSpec": "0.1.4",
|
|
"spec": "0.1.4",
|
|
"type": "version"
|
|
},
|
|
"/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/auth0-js"
|
|
]
|
|
],
|
|
"_from": "winchan@0.1.4",
|
|
"_id": "winchan@0.1.4",
|
|
"_inCache": true,
|
|
"_location": "/winchan",
|
|
"_nodeVersion": "4.5.0",
|
|
"_npmOperationalInternal": {
|
|
"host": "packages-12-west.internal.npmjs.com",
|
|
"tmp": "tmp/winchan-0.1.4.tgz_1476293321931_0.8395239987876266"
|
|
},
|
|
"_npmUser": {
|
|
"name": "cristiandouce",
|
|
"email": "cristian@gravityonmars.com"
|
|
},
|
|
"_npmVersion": "2.15.9",
|
|
"_phantomChildren": {},
|
|
"_requested": {
|
|
"raw": "winchan@0.1.4",
|
|
"scope": null,
|
|
"escapedName": "winchan",
|
|
"name": "winchan",
|
|
"rawSpec": "0.1.4",
|
|
"spec": "0.1.4",
|
|
"type": "version"
|
|
},
|
|
"_requiredBy": [
|
|
"/auth0-js"
|
|
],
|
|
"_resolved": "https://registry.npmjs.org/winchan/-/winchan-0.1.4.tgz",
|
|
"_shasum": "88fa12411cd542eb626018c38a196bcbb17993bb",
|
|
"_shrinkwrap": null,
|
|
"_spec": "winchan@0.1.4",
|
|
"_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/auth0-js",
|
|
"bugs": {
|
|
"url": "https://github.com/auth0/winchan/issues"
|
|
},
|
|
"dependencies": {},
|
|
"description": "Here's the scenario: You want to build a secure means of some untrusted site opening a window, which loads content at a trusted site. Then you want the untrusted dude to be able to pass in parameters. Then you want the trusted code to do any amount of stuff, and return a response.",
|
|
"devDependencies": {
|
|
"express": "3.21.2",
|
|
"mocha": "^1.20.1",
|
|
"postprocess": "~0.2.4",
|
|
"selenium-webdriver": "^2.42.1",
|
|
"webdriver-manager": "0.0.6"
|
|
},
|
|
"directories": {},
|
|
"dist": {
|
|
"shasum": "88fa12411cd542eb626018c38a196bcbb17993bb",
|
|
"tarball": "https://registry.npmjs.org/winchan/-/winchan-0.1.4.tgz"
|
|
},
|
|
"gitHead": "44f07d0c5562718864db06a9c881b9956d0872d2",
|
|
"homepage": "https://github.com/auth0/winchan#readme",
|
|
"license": "MIT",
|
|
"main": "./winchan.js",
|
|
"maintainers": [
|
|
{
|
|
"name": "auth0",
|
|
"email": "support@auth0.com"
|
|
},
|
|
{
|
|
"name": "cristiandouce",
|
|
"email": "cristiandouce@gmail.com"
|
|
},
|
|
{
|
|
"name": "pose",
|
|
"email": "albertopose@gmail.com"
|
|
}
|
|
],
|
|
"name": "winchan",
|
|
"optionalDependencies": {},
|
|
"readme": "## An abstraction for opening browser windows cross domain\n\nHere's the scenario: You want to build a secure means of some untrusted site\nopening a window, which loads content at a trusted site. Then you want the \nuntrusted dude to be able to pass in parameters. Then you want the trusted\ncode to do any amount of stuff, and return a response.\n\nThis kinda thing is what lots of services on the web do, services\nlike [BrowserID][].\n\n [BrowserID]: https://browserid.org\n\nTrouble is that this is stupidly hard:\n\n * Mobile Firefox doesn't like it when you open windows with window options\n * IE 8 & 9 don't even allow postMessage between opener and window\n * iOS 5 has some interesting optimizations that can bite you if not careful\n * you should tightly check origins to avoid classes of attacks\n * you probably will have to add stuff in the DOM, you should make sure you\n can clean this up and avoid introducing fragile code\n\nWinChan is an abstraction to solve these problems and make it easy to open\nwindows which take and return parameters and load content cross domain.\n\n## Browser Support\n\nWinChan is expected to work on:\n\n * winxp - win7 on IE8 and IE9\n * windows, linux, osx - Chrome, Firefox, Opera, and Safari\n * Android's \"native\" browser - 2.1, 2.2, 2.3.4, 3.2 (and presumably newer)\n * Fennec on Android\n\n## Usage\n\nFor the site spawning the window, the \"untrusted\" or \"client\" code:\n\n WinChan.open({\n url: \"http://trusted.host/dialog.html\",\n relay_url: \"http://trusted.host/relay.html\",\n window_features: \"menubar=0,location=0,resizable=0,scrollbars=0,status=0,dialog=1,width=700,height=375\",\n params: {\n these: \"things\",\n are: \"input parameters\"\n }\n }, function(err, r) {\n // err is a string on failure, otherwise r is the response object\n });\n\nFor the site providing the window, the \"trusted\" code:\n\n WinChan.onOpen(function(origin, args, cb) {\n // origin is the scheme+host+port that cause window invocation,\n // it can be trusted\n\n // args are the untrusted arguments provided by the calling site\n\n // and cb you can call within the function, or synchronously later.\n // calling it indicated the window is done and can be closed.\n cb({\n \"these things\": \"are the response\"\n });\n });\n\nFinally, you'll notice that the trusted code needs to host 'relay.html' somewhere (required\nfor IE support).\n\n## Running Examples\n\nthere's a little tiny webserver in-tree to let you run the examples. You'll need node.js and\nnpm installed. Once you have these, just:\n\n $ npm i\n $ scripts/run_example.js\n\nNow load `http://127.0.0.1:8100/example` (or the more complicated example which demonstrates\nnavigation away and back in window at `http://127.0.0.1:8100/complex_example`\n\n## Running Unit Tests\n\nnode.js and npm are required to run the unit tests. Once installed\n\n $ npm i\n $ scripts/run_example.js\n\nAnd open `http://127.0.0.1:8100/test` in your favorite web browser.\n\n**NOTE:** You'll need to disable popup blocking for localhost to run tests!\n\n## Testing over the network\n\nthe `run_example.js` script will bind whatever IP is in the `IP_ADDRESS` env var.\nSo to test over the network:\n\n $ npm i\n $ IP_ADDRESS=<my external IP> scripts/run_example.js\n\n(repace `<my external IP>` with *your* IP address)\n\nthen hit `http://<my external IP>:8100/test`\n\n",
|
|
"readmeFilename": "README.md",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/auth0/winchan.git"
|
|
},
|
|
"scripts": {
|
|
"integration": "/Users/apose/auth0/winchan/node_modules/webdriver-manager/lib/index.js && ./node_modules/.bin/mocha scenario"
|
|
},
|
|
"version": "0.1.4"
|
|
}
|