aboutsummaryrefslogtreecommitdiff
path: root/app/handlers/token.py
AgeCommit message (Collapse)Author
2014-11-18token: Fix token handler for new mongodb object ID.Milo Casagrande
Change-Id: I4c6d7fab082485e0b31a9e58067df214812ba17d
2014-11-10token: Fix save call.Milo Casagrande
Change-Id: I587480a4275481da4e4583f695eda9db47848845
2014-10-21handlers: Refactor token validation logic.Milo Casagrande
* Add master_key validation where it belongs, only in the token handler. * Rework validation methods. * Add tests. Change-Id: Ib457963bc2ae2018e8241297f75b8667dac0e572
2014-10-20token: Refactor token validation decorator.Milo Casagrande
Change-Id: I7d26ba2c67abd047bc439725f3b9407e4becade1
2014-10-16handlers: Make instance method into static one, refactor.Milo Casagrande
* Turn _valid_keys into a static method for all handlers. * Use in batch handlers the valid keys defined in common. * Change the JSON serializer using the default one, and change how mongodb Cursor results are stored (should be slightly faster). Change-Id: I17cf26d9011e34125bf6873edda7179a5202aa39
2014-10-15handlers: Use the newly defined keys and values.Milo Casagrande
* Refactor handlers code to use the newly defined keys. Change-Id: Ib14578bd1f2a57297b2296a0c1d12824700c9f2e
2014-09-11handlers: Refactor common methods into module.Milo Casagrande
* Move all the handlers common methods into a single module (making them "static"). * Refactor methods and tests. * Add new tests. Change-Id: Ied713e6d5a9d4c16dcc27794509bdc6dd1193c1f
2014-07-31Massive refactoring.Milo Casagrande
* Will break the frontend. * Rework BaseHandler in order for that to handle all the async calls setup, and leave the subclasses to implement just the correct methods. * TokenHandler is a special case, since we need special token protection for that. * Fix db.py so that it returns plaun mongodb objects (Cursor) and store them as is: they are iteratable. * Make HandlerResponse the only accepted response type to create the response that is sent to the clients. * Fixe, rework and add tests. Change-Id: Ief7dad65b2801f701e7e5f67b3a360329aca69f6
2014-07-30TokenHandler: Remove log call.Milo Casagrande
Change-Id: Ib236d67ea5f5acb97630f18daa9bccc84266188d
2014-07-30Fix delete token call.Milo Casagrande
* It needs an array, not just a string. Change-Id: I43738b583b12256c035deb8e078d2ee87d68f156
2014-07-30TokenHandler: Implement DELETE.Milo Casagrande
* Implement DELETE method. * Add tests. * Trivia variable name refactor. Change-Id: I90e8c9dee36e2b1fc0f2ecfa52524049b54b8bdc
2014-07-30TokenHandler: Rework POST method, add tests.Milo Casagrande
* Rework the POST method and handle new tokens creation and update. * Add tests. Change-Id: Ic5f66f6e171c518d0cbb2b3f849b506e51bdc900
2014-07-30Use HandlerResponse in TokenHandler.Milo Casagrande
Change-Id: Ib866b6cf123a3fa91b79daa1e5a50d4948d21dec
2014-07-29TokenHandler: Implement GET and partial POST.Milo Casagrande
* Implement GET method. * Implement POST only on new token creation. * Add intial test coverage. Change-Id: I775391abbf97bfc09723a23db9c77499906b8248
2014-07-29Change JSON keys validator logic.Milo Casagrande
* Now if not all the valid keys are in the JSON object, but the one available are valid, the JSON object is valid. Single handlers need to implement more detailed validation. Change-Id: I93d4778bbfdff983bbcc19d5331370202bb47062