Commit graph

16 commits

Author SHA1 Message Date
ReAnzu
f19c82d110 Addressed defects
* Deleting the current token used for the session, now forces a logout.
* Removed an assert in the is_valid_token code that was erroneous.
* Sorted imports in test_auth according to style.
2018-03-10 16:38:55 -06:00
ReAnzu
6f53ca92d9 client/user: Removed async/await code
* Moved user_token retrieval for display to the Promise.all pattern used elsewhere in the codebase.
2018-03-10 16:38:55 -06:00
ReAnzu
606ef31b01 Added note and expiration fields to the user_token model
* Updated UI to show more information about the token.
* Updated the js API to note the client token when creating it.
* Added prototype override to do add day calculations on dates.
* Updated auth check against token to inspect the expiration date of the token if it possesses one.
2018-03-10 16:38:55 -06:00
ReAnzu
8b320ff978 Address pull request comments
* Reformatted javascript
* Appeased pycodestyle
* TODO Add Expiration and Note fields to tokens?
2018-03-10 16:38:55 -06:00
ReAnzu
483c32cfbf User Token Authentication
* Users are only authenticated against their password on login, and to retrieve a token.
* Passwords are wiped from the app and cookies after login and token retrieval
* Tokens are revoked at the end of the session/logout
* If the user chooses the "remember me" option, the token is stored in the cookie
* A user interface to revoke tokens will be added
* Tokens correctly delete themselves on logout
* API documentation updated for the new user-token endpoints
* Added a Manage tokens tab to the user panel
* Added bullet point about the token authentication for the API
* Added tests for new endpoints and tests against authentication middleware
2018-03-10 16:38:55 -06:00
rr-
1acceb941d client: refactor linking and routing
Print all links through new uri.js component
Refactor the router to use more predictable parsing
Fix linking to entities with weird names (that contain slashes, + etc.)
2017-01-21 00:13:35 +01:00
rr-
8a73f7e400 client: rework promise error handling 2017-01-08 10:25:29 +01:00
rr-
acd989cabb client/tags: fix URL redirections
User controller didn't need intervention but I refactored it to match
tag controller anyway.
2016-08-28 23:57:53 +02:00
rr-
08c6c2c145 client/auth: show errors early in controllers
In other words, verify the privileges client-side before issuing an
request to the server. This commit focuses on routing (e.g. clicking a
link while not logged in), rather than DOM element visibility that
should be already taken care of.
2016-08-23 23:12:29 +02:00
rr-
fec31d7946 client/users: add exit confirmation for edit form 2016-08-22 21:38:34 +02:00
rr-
d8d4654849 client/events: adjust event names
1. "change" should be used to passive changes.
2. "submit" should be used to form submits.

These are not interchangeable.
2016-08-22 21:36:45 +02:00
rr-
2a39ec165d client/general: add title to every page 2016-07-13 21:50:07 +02:00
rr-
5ac5eb5503 client/general: refactor URL parameter handling 2016-07-08 00:54:24 +02:00
rr-
2f20bc1619 client/general: fix certain error handlers 2016-06-23 12:47:56 +02:00
rr-
eb09677bf8 client/general: replace direct API with models 2016-06-20 23:52:09 +02:00
rr-
54e3099c56 client/general: refactor control flow
- Controller lifetime is bound to route lifetime
- View lifetime is bound to controller lifetime
- Control lifetime is bound to view lifetime
- Enhanced event dispatching
- Enhanced responsiveness in some places
- Views communicate user input to controllers via new event system
2016-06-18 10:35:20 +02:00