I am not sure I understand the issue.
-
We
saw that the HttpAuthenticationFilter adds an Authorization header with the basic authentication, and that's why there's a condition to not execute the authentication process if this header exists on the original request.
Do I understand correctly that you want to repeat the authentication again to another endpoint? If so, can you create another filter with higher priority than HttpAuthenticationFilter,
remove the REQUEST_PROPERTY_FILTER_REUSED property,
and set the new URI in ClientRequestContext?
Or you want to make a completely new request from a filter with a lower priority with the new token you received and repeat a similar logic from repeatRequest method?
-- Jan
Hi!
I'm facing a problem at work and can't find any alternatives.
We need to call an external API and for that, we have to pass by the proxy with authentication. For the first request, to get an access token, we are using the feature that adds the HttpAuthenticationFilter.
So, for that, with my user and password, everything is ok. But now, I need to call another endpoint passing the token from the previous request as an Authorization header.
We saw that the HttpAuthenticationFilter adds an Authorization header with the basic authentication, and that's why there's a condition to not execute the authentication process if this header exists on the original request.
We got the working using OkHttp, but I know they use another process for the authentication. There's something we can do to provide something similar?
Thanks in advance.