Commit Graph

17 Commits

Author SHA1 Message Date
Nicholas Staples
b56e324a4c Working tests and provider stats table.
Fix for tests and import error.

Added tests and updated for code review comments.
2016-04-25 12:20:06 +01:00
Adam Shimali
74ac5b5f30 Added version history to api keys. This needed a bit of change
to create history to handle foreign keys better. There may yet
be a better way of doing this that I have not found yet in sqlalchemy
docs.
2016-04-21 14:47:58 +01:00
Rebecca Law
c9761cd58a remove unused import 2016-04-15 10:59:00 +01:00
Rebecca Law
282a62e636 Use the new version of the notifications-python-client. This version no longer adds the req and pay to the claims of the jwt.
The change is backward compatible so an older client that sends a jwt with the extra claims will pass authentication.
Once all the clients have been updated to not include the extra claims some updates to exclude them from the method signatures will happen as well.
2016-04-14 18:12:33 +01:00
Nicholas Staples
90f0505a3d Update limit to message_limit.
Further db changes and updates.

Remove traceback print out.

Fix bug in passing template id to a task.
2016-04-11 16:53:40 +01:00
Rebecca Law
fe9bf13064 Format authentication error messages for the client. 2016-03-14 15:51:04 +00:00
Martyn Inglis
dc294c32ae Fix all other dependant classes that are affected by the DAO / Service / Model changes 2016-02-19 15:54:11 +00:00
Martyn Inglis
d38ba0d36a bumped client version 2016-02-09 18:48:02 +00:00
Rebecca Law
416dd00ac8 Added a test for the case when there is no secret for the api client.
Fix codestyle
2016-02-08 11:33:24 +00:00
Rebecca Law
b5c662eca8 Change services.id to a UUID
Ideally all the primary keys in the db would be UUID in order to guarantee unique ids across distributed dbs.
This updates the services.id to a UUID. All the tables with a foreign key to the services.id are also updated.
The endpoints no longer state a data type of the <service_id> path param.
All the tests are updated to reflect this update.

The thing to pay attention to is the 0011_uuid_service_id.py migration script.
This commit must go with a commit on the notifications_admin app to keep things working.
There will be a small outage until both deploys have happened.
2016-02-02 14:22:22 +00:00
Rebecca Law
8fa1cac1c6 Fix the user url.
Add test for authentication to test paths with path params
2016-01-22 09:59:02 +00:00
Rebecca Law
27a381c3e9 Allow services to have multiple api keys.
/service/<service_id>/api-key/renew has been renamed to /service/<service_id>/api-key
/service/<service_id>/api-key now creates a token and no longer expires the existing api key.
Moved test for this endpoint to it's own file.
2016-01-20 10:57:46 +00:00
Rebecca Law
1db57dca8c Allow for multiple api keys for a service. 2016-01-19 18:25:21 +00:00
Martyn Inglis
fa30782d70 Removed Status endpoints from requiring Auth tokens
- auth tests now use service endpoints

- one test commented out and needs reworked
2016-01-19 15:32:33 +00:00
Rebecca Law
4fc5c34320 Change Tokens to ApiKey
Added name to ApiKey model
2016-01-19 12:13:47 +00:00
Rebecca Law
0ad292300d Added authorization headers for all requests 2016-01-15 17:02:29 +00:00
Rebecca Law
5f59b631e1 Added the before_request so that all calls must have a valid token.
Next is to get all the rest tests to pass again.
2016-01-15 17:01:26 +00:00