mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-06 08:35:55 +00:00
* Add refresh token header/cookie As part of work on automatic refreshing of access tokens in the grafana plugin (FB-1377), we will now accept a refresh token in the "X-Molecula-Refresh-Token" header or the "refresh-molecula-chip" cookie. This refresh token will be used if the access token is expired. To achieve this, there was a lot of plumbing that had to be done. Here is a list of some of it: * Added lots of constants for the new values. * Removed token cache, since we will be keeping state on the clients. * We now only refresh tokens when they are expired, which is more inline with the OAuth spec. * Refactored SetGRPCMetadata to be simpler to read. * Refactored AddAuthToken. * Update failing tests. * We now don't split GRPC cookies on ";". Not sure why we did that before tbh. I also added TODOs to add the refresh token to other subcommands. This is out of scope for my current ticket, but it would be nice to have in the future. * remove unnecessary context from Authenticate * Add comments on why we check both cases for headers It's because some GRPC clients lowercase metadata names. I've run into issues with this enough that I think it's worth the extra checks. We prefer lowercase though, because that's "standard". * Fix test that broke during rebase |
||
|---|---|---|
| .. | ||
| testdata | ||
| backup.go | ||
| chksum.go | ||
| common.go | ||
| config.go | ||
| config_test.go | ||
| doc.go | ||
| export.go | ||
| export_test.go | ||
| generate_config.go | ||
| generate_config_test.go | ||
| import.go | ||
| import_test.go | ||
| keygen.go | ||
| main_test.go | ||
| rbf_check.go | ||
| rbf_check_test.go | ||
| rbf_dump.go | ||
| rbf_page.go | ||
| rbf_pages.go | ||
| rbf_pages_test.go | ||
| restore.go | ||
| server.go | ||
| server_test.go | ||
| util.go | ||