https://github.com/timwaters/warper_oauth_token_auth_demo
Simple mini app to demonstrate using j-toker jquery authentication and simple_token_authentication for the wikimaps warper
https://github.com/timwaters/warper_oauth_token_auth_demo
Last synced: about 1 year ago
JSON representation
Simple mini app to demonstrate using j-toker jquery authentication and simple_token_authentication for the wikimaps warper
- Host: GitHub
- URL: https://github.com/timwaters/warper_oauth_token_auth_demo
- Owner: timwaters
- Created: 2016-06-02T20:31:16.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-22T14:19:38.000Z (about 10 years ago)
- Last Synced: 2025-02-09T12:29:36.397Z (over 1 year ago)
- Language: JavaScript
- Size: 126 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme
Awesome Lists containing this project
README
Simple mini app to demonstrate using j-toker jquery authentication and simple_token_authentication for the wikimaps warper
run as a server:
for example: `python -m SimpleHTTPServer` and navigate to localhost:8000
Click login via github, jtoker will call the warper, which calls github and then via the browser postMessage API opens a window.
Jtoker is listening to the message and logs the user in.
Click the Get User details and call the warper with details about the user. This is authenticated via headers.
when it loads, jtoker will try to use the token it has stored in localstorage and call /api/v1/validate_token which if the token is still valid will return the user details and effectively log the user in. This means that the user does not have to log in via oauth each time they load the js app.