mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +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 |
||
|---|---|---|
| .. | ||
| clustertests | ||
| test | ||