bugraoz93 commented on PR #51657: URL: https://github.com/apache/airflow/pull/51657#issuecomment-2997782216
> Overall it is much better :) I like the direction and I think we are close. Thanks for being receptive to my comments :) > > On top of my comments, one other thing: I think we should call `refresh_token` only when the token expired. A bit like your previous implementation. Basically: > > * Detecting when Keycloak token expired by catching the exception. When that happens, raising another generic exception (e.g. using an exception from `jwt` package) > * In the middleware, catching this exception, and calling `refresh_token` when that happens > > That allows to call `refresh_token` only when the token expires, otherwise we call `refresh_token` at every call, which can lead to severe latency increase. Thanks a lot, Vincent! I would be a lot faster in different areas but in auth managers, I have learned a lot during the implementation. Still small unit test is needed for `refresh_token`. Functionality is also working as expected. I will try to do it and finalise this one in the coming hours. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
