[REQ] [typescript-node] Promise-based Authentication interface
Created by: silasbw
Is your feature request related to a problem? Please describe.
The current TypeScript Node Authentication
interface for applying authentication settings (.applyToRequest
) is synchronous. It would be useful to support a Promise-based asynchronous API also. For example, to fetch a refreshed authentication token.
https://github.com/kubernetes-client/javascript/issues/294#issuecomment-510323971 is one example that would use this feature.
Describe the solution you'd like
Update Authentication.applyToRequest
to return Promise<void> | void
.
Describe alternatives you've considered
- "
spawnSync
-style hacks", like serializing arguments and passing them to an script and parsing the result - Breaking change to
Authentication.applyToRequest
that forces all implementers to return aPromise<void>