api-client icon indicating copy to clipboard operation
api-client copied to clipboard

Add Bearer token authorization expiration strategies

Open gregglind opened this issue 6 months ago • 0 comments

Is your feature request related to a problem? Please describe.

api-client HeaderAuthentication assumes that all Bearer tokens are valid.

When these token expire or are invalidated at the server,

Describe the solution you'd like

  1. Add authenticate or bearer_authenticate method that defines how to get a valid Bearer token. Bonus: This method should implement backoff and error-handling.

Describe alternatives you've considered

  1. Define and a BaseAuthentication class to contain the methods for getting an authorization.

Additional context This is a hard request, and I am very interested in hearing what designs sound good to others.

gregglind avatar Jul 31 '24 19:07 gregglind