-
- Downloads
Refactor how token refreshing works to be more resilient (#4819)
* Refactor how token refreshing works to be more resilient 1. ensure we do use the new token if it is not explicitly inhibited by the caller 2. eagerly refresh token if we know it is expired 3. allow refreshing a token multiple times if e.g. on bad connection or the environment has been slept and sufficient time has passed since the last refresh attempt Signed-off-by:Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by:
Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by:
Michael Telatynski <7t3chguy@gmail.com> * Add exponential backoff Signed-off-by:
Michael Telatynski <7t3chguy@gmail.com> * Ensure no timing effects on `authedRequest` method call Signed-off-by:
Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by:
Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by:
Michael Telatynski <7t3chguy@gmail.com>
Showing
- spec/unit/http-api/fetch.spec.ts 4 additions, 1 deletionspec/unit/http-api/fetch.spec.ts
- spec/unit/oidc/tokenRefresher.spec.ts 30 additions, 20 deletionsspec/unit/oidc/tokenRefresher.spec.ts
- src/http-api/fetch.ts 35 additions, 76 deletionssrc/http-api/fetch.ts
- src/http-api/interface.ts 11 additions, 0 deletionssrc/http-api/interface.ts
- src/http-api/refresh.ts 165 additions, 0 deletionssrc/http-api/refresh.ts
- src/oidc/tokenRefresher.ts 4 additions, 1 deletionsrc/oidc/tokenRefresher.ts
- src/utils/decorators.ts 0 additions, 39 deletionssrc/utils/decorators.ts
Loading
Please register or sign in to comment