This repository has been archived by the owner on Feb 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
This is the example to use WebCrypto connect-js and also npm #8
Open
henrjk
wants to merge
14
commits into
anvilresearch:henrjk-use-npm
Choose a base branch
from
henrjk:use-npm2
base: henrjk-use-npm
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Mar 27, 2016
-
Use webcrypto based connect-js library.
This adopts usage of the WebCrypto Api based connect-js library as tracked on anvilresearch/connect-js#7 (comment) With this most API methods are now returning promises. Summary of other changes: * Use npm and browserify to consume connect-js * Adopt latest anvil cli The changes were made over a period of time. Here are some of the more notable original commits with comments: COMMIT: callback_popup to check whether opener is available COMMIT: index.html shows userInfo.name may not be available COMMIT: add APP_AUTH_CALLBACK variable COMMIT: establish scope.session in SigninCtrl and MainCtrl COMMIT: scope to requireScope profile instead of realm COMMIT: adopt new cli COMMIT: Handle disconnected popup in passwordless login. The passwordless login method sends the user a link in an email. When the user follows this link a new browser window opens. However the original popup window will not redirect and remains open with a page allowing to resend the link. The connect-js library was changed to handle this case so that it would expect the page which is opened when the email link is followed to handle the callback so that the session is populated appropriately in localStorage. connect-js now listens for that and then closes the popup window. It also expect the email page to close itself. This may not work for all browsers. I did see this work in Chrome and Safari but fail in Firefox. Note that the popup Callback should behave in the same way it it is redirected by the server, which happens when other authentication methods are used. This also adds the newer dependencies and improves logging similar to how it was done in connect-js. COMMIT: refresh angular app on passwordless login COMMIT: adding jspm bundle-sfx for demo COMMIT: Manual angular bootstrap This was to avoid issue systemjs/systemjs#1032 COMMIT: Switch to using npm and browserify This now requires anvil-connect-js ^0.2 bower is still used for shims and bootstrap. Some bugs were addressed found during manual testing. Also added more logging using bows. COMMIT: Added section Get connect-js client libraries I am uncertain about the remainder of the doc, but it looked OK to me at first glance although I have not done a client registration for quite some time.
Configuration menu - View commit details
-
Copy full SHA for d36b82d - Browse repository at this point
Copy the full SHA d36b82dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1335aa1 - Browse repository at this point
Copy the full SHA 1335aa1View commit details -
Reverses usage of location.href in app.js in favor of $location.url. Also fixes refresh problem when the destination was not visited. Previously for example after signin the callback url would remain the browsers location. Now angular properly takes the changes made to the Url into account.
Configuration menu - View commit details
-
Copy full SHA for 15067f3 - Browse repository at this point
Copy the full SHA 15067f3View commit details -
pull app configuration into app.config
Files in /app.config/ are now generated on grunt config based on the templates in /app.config.templ/* and the corresponding variables in /authconfig.json authconfig.json contains variables describing the issuer (connect server) and the server the app will run on as wells as other registration information. After `grunt config` there are 2 files in /app.config: 1. /app.config/anvil-config.js which is used by app/scripts/*.js files to configure the Anvil client library. 2. /app.config/register_with_anvil_connect.sh is a shell script which registers this client with the server using the `nvl` command line. This change allows to to have to eliminate intermediate copies of all app files which where previously in app.browser. Now /app.browser is used primarily to save dev-bundles generated by browserify. See npm run watchify to keep these up to date. In addition index.html still uses config values for declaring the session management iframes in particular for the op iframe.
Configuration menu - View commit details
-
Copy full SHA for d78a14a - Browse repository at this point
Copy the full SHA d78a14aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c9d0f5e - Browse repository at this point
Copy the full SHA c9d0f5eView commit details -
Eliminate bower usage and cleanup
Forked webcrypto-shim to add package.json so it can be consumed: `npm install --save-dev henrjk/webcrypto-shim#add-package-json` Remove no longer used script replace-client-id
Configuration menu - View commit details
-
Copy full SHA for 6d21201 - Browse repository at this point
Copy the full SHA 6d21201View commit details -
Configuration menu - View commit details
-
Copy full SHA for 21af662 - Browse repository at this point
Copy the full SHA 21af662View commit details -
register_with_anvil_connect.sh improve nvl error reporting
The script issues a lengthy nvl client:register command. Before when errors occurred one could not see the nvl output. Changed the script to write stdout and stderr of the nvl client:register command to file `nvl.log`. One can see further details in that file which should help quite a bit although relevant messages might be quite buried. Anyways this should be good enough!
Configuration menu - View commit details
-
Copy full SHA for 688c8e8 - Browse repository at this point
Copy the full SHA 688c8e8View commit details -
Fixed issues: * npm run watchify would not provide source maps in bundles * live reload not working when config changed
Configuration menu - View commit details
-
Copy full SHA for 52077b2 - Browse repository at this point
Copy the full SHA 52077b2View commit details -
Fixed issue using popup authorization.
This requires popup anvil-connect-js version 0.2.4 for refresh to work.
Configuration menu - View commit details
-
Copy full SHA for beff011 - Browse repository at this point
Copy the full SHA beff011View commit details -
Configuration menu - View commit details
-
Copy full SHA for e093642 - Browse repository at this point
Copy the full SHA e093642View commit details -
OpenIDConnect session management
The changes here use the 'not-authenticated' event introduced in anvil-connect-js 0.2.5 as well as the 'authenticated' event. Also added some rp logging and calling Anvil#checkSession every 5 seconds.
Configuration menu - View commit details
-
Copy full SHA for 42307fa - Browse repository at this point
Copy the full SHA 42307faView commit details
Commits on Mar 31, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 8fe32d9 - Browse repository at this point
Copy the full SHA 8fe32d9View commit details -
package.json script additions and fixes.
1. npm run clean-all was missing rimraf 2. npm run config can now be used to
Configuration menu - View commit details
-
Copy full SHA for 8f5f0de - Browse repository at this point
Copy the full SHA 8f5f0deView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.