Closed
Description
I have recently integrated Token Exchange into my project as I need to perform long-lived background tasks on behalf of the user. It exchanges the original access token from the user authentication for another with offline_access, which needs to be refreshed periodically (Keycloak).
Unfortunately, the current implementation of TokenExchangeOAuth2AuthorizedClientProvider doesn't support the refresh_token token type.
I managed to implement a custom version of the Token Exchange provider to support this and make it compatible with the Refresh Token provider, but It would be good to have it built in Spring Security as it is a common case.