Commit Graph

12 Commits

Author SHA1 Message Date
chris48s
d8831729cb Check request origin before sending credentials (#4729)
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2020-03-04 20:42:27 +00:00
Paul Melnikow
65afff40d4 Fix up Redis config (#3705)
- Move to private
- Fix validation
- Don't log the URL

Ref #3332
2019-07-12 19:12:49 -04:00
Paul Melnikow
e2608a6570 Refactor GitHub OAuth credential handling (#3693)
Continues the work of #3652.
2019-07-11 18:04:53 -04:00
Paul Melnikow
5ff7beb3bf Reorganize token pooling code (#2792)
Ref #2698
2019-01-18 06:18:31 -05:00
Paul Melnikow
18b98a30e3 Reorganize server and service test runner (#2781)
Ref #2698
2019-01-16 16:30:18 -05:00
Paul Melnikow
048291a024 Fix [GitHub] token handling (#2730)
Fix #2728
2019-01-11 13:16:44 -05:00
Paul Melnikow
c4efdc8e66 Rewrite and test Github auth logic, separating standard and search quota (#1205)
The end of an era.
2019-01-10 21:30:23 -05:00
Paul Melnikow
3eac8ebbfb Rework GitHub acceptor and move to its own module (#2021)
Continue to merge the work from #1205.
2018-11-09 15:14:01 -05:00
Paul Melnikow
a16d436602 Optionally persist [Github] tokens in Redis (#1939)
This is a fairly simple addition of a Redis-backed TokenPersistence. When GithubConstellation is initialized, it will create a FsTokenPersistence or a RedisTokenPersistence based on configuration. Have added tests of the Redis backend as an integration test, and ensured the server starts up correctly when a `REDIS_URL` is configured.

Ref: #1848
2018-08-19 10:27:23 -04:00
Paul Melnikow
b10a6a4aa7 Refactor [github] token persistence, again (#1906)
Instead of saving tokens on a timer, save them when they change. Use EventEmitter to keep the components loosely coupled.

This is easier to reason about, much easier to test, and better supports adapting to backends which support atomic operations.

This replaces json-autosave, which was a bit difficult to read and also hard to test, with fsos, the lower-level utility it’s built on.

Ref: #1848
2018-08-18 23:54:53 -04:00
Paul Melnikow
9007658fd0 Refactor and test [github] token persistence (#1863)
Ref #1848 #1205
2018-08-11 20:13:40 -04:00
Paul Melnikow
c11d97a192 Refactor [github] initialization (#1861)
This creates a new convenience class which consolidates all the Github initialization. It supports dependency injection and facilitates refactoring the persistence along the lines of #1205.

Also ref #1848
2018-08-09 07:20:57 -04:00