Commit Graph

218 Commits

Author SHA1 Message Date
Scott Sanderson
74d3740921 DEV: Allow configuration of default headers.
Applies Content-Security-Policy: frame-ancestors 'self' by default.
2015-04-24 01:19:25 -04:00
Min RK
d9fc40652d test shutdown API handler 2015-04-07 15:49:25 -07:00
Min RK
edfb39c74c Merge pull request #148 from minrk/poke-proxy-api
add proxy API
2015-02-08 10:24:42 -08:00
Min RK
c82903b85e add 'pending' to user REST model 2015-02-08 10:19:48 -08:00
Min RK
4fd58b2bf2 add proxy API
- GET fetches proxy table (relays same request to proxy's API endpoint)
- POST prods routing table sync (useful when proxy restarts)
- PATCH allows updating the proxy API location, auth token
2015-02-06 17:06:41 -08:00
Min RK
09d9efb44c handle Spawners that are slow to stop
e.g. docker, which can take a long time to stop,
especially if several docker actions are already queued.

Use status `202: Accepted` for API replies sent with spawn/stop still pending
2015-01-28 11:35:38 -08:00
Min RK
7a0979aa4f don't compare last_activity in user models 2015-01-07 15:10:34 -08:00
Min RK
6d95bf1893 test slow and never-finishing spawners 2014-12-22 13:27:23 -08:00
Min RK
27e51cd0b4 Merge pull request #81 from minrk/crypto-db
hash tokens in database

closes #80
closes #83
2014-10-30 16:20:16 -07:00
Scott Sanderson
8cfbe9b38e DEV: Close transactions at the end of HTTP Requests.
Fixes #84
2014-10-29 17:38:24 -04:00
Min RK
ae7b92c55e get rid of cookie tokens
use single cookie_id, since cookies themselves are already unique via `set_secure_cookie`

resetting cookie_id effectively logs out all browser sessions for a given user
2014-10-28 15:01:29 -07:00
MinRK
bce2be7401 only store hashed tokens
- use PasswordType
- store first 4 bytes for filtering by prefix
  since we can't filter by equality on the hashed value.
- user.new_foo_token() returns token string, not ORM object
2014-10-27 17:29:44 -07:00
MinRK
0bd03f0861 remove cookie_secret from single-user servers
pass encrypted cookies to Hub for verification
2014-10-26 20:23:24 -07:00
MinRK
d8ef6d59c1 adjustments to Spawner.stop
- call start/stop_polling outside Spawner
  (avoids need for custom spawners to reimplement)
- don't clear state when stopping Spawner
  (should enable spawners to resume)
2014-10-08 13:54:17 -07:00
MinRK
e2f12f7071 raise 400 when failing to create users 2014-09-25 14:49:06 -07:00
MinRK
0a8759b0a5 flesh out REST API
can now list/view/add/create/modify users
and start/stop single-user servers
2014-09-14 16:47:09 -07:00
MinRK
833835b0f3 add user list handler, first of many 2014-09-14 11:54:37 -07:00
MinRK
5c87461605 add mock utils to tests
basic testing framework to get starting writing and testing the REST API

including tests for the authorizations API,
the only API URL defined so far.
2014-09-13 16:11:22 -07:00