16 Commits

Author SHA1 Message Date
4e0ad50102 middleware: Make scenario test functions take a testing.T argument (#29564)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-04 11:09:32 +01:00
58dbf96a12 Middleware: Rewrite tests to use standard library (#29535)
* middleware: Rewrite tests to use standard library

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-03 08:28:54 +01:00
41d432b5ae Chore: Enable whitespace linter (#25903)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
f2f2722bb1 chore: avoid aliasing models in middleware (#22484) 2020-02-28 12:50:58 +01:00
9660356638 Auth: Enable retries and transaction for some db calls for auth tokens (#16785)
the WithSession wrapper handles retries and connection
management so the caller dont have to worry about it.
2019-04-30 14:42:01 +02:00
67cbc7d4cf Chore: use remote cache instead of session storage (#16114)
Replaces session storage in auth_proxy middleware with remote cache

Fixes #15161
2019-04-08 14:31:46 +03:00
8029e48588 support get user tokens/revoke all user tokens in UserTokenService 2019-03-08 15:15:17 +01:00
e163aadfe4 use authtoken for session quota restrictions
closes #15360
2019-02-12 15:10:55 +01:00
8678620730 move UserToken and UserTokenService to models package 2019-02-06 16:55:12 +01:00
a60124a88c change UserToken from interface to struct 2019-02-06 16:30:50 +01:00
d53e64a32c move auth token middleware/hooks to middleware package
fix/adds auth token middleware tests
2019-02-05 00:21:05 +01:00
59d0c19ba8 passing middleware tests 2019-01-22 13:51:55 +01:00
c0ecdee375 rename Context to ReqContext 2018-03-07 11:54:50 -05:00
338655dd37 move Context and session out of middleware 2018-03-06 18:16:49 -05:00
5e949b0564 fix(quota): fixed failing quota unit tests 2015-09-18 08:36:58 +02:00
1ad10914ce add quota middleware unittests 2015-09-15 18:19:47 +08:00