-
Notifications
You must be signed in to change notification settings - Fork 31
LAU-1325 Add Interceptor to override token #2691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
5d2e266 to
ee120d1
Compare
| return template -> { | ||
| template.removeHeader("ServiceAuthorization"); | ||
| String token = securityUtils.getServiceAuthorization(); | ||
| template.header("ServiceAuthorization", token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will run on every single request going through feign and we need to check if performance is not going to be impacted. I believe this will run on every request, not as comment suggests - on retries only.
rapolaskaseliscgi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to be sure it does not impact performance.
RebeccaBaker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be perf tested
Actually I had a look in the existing implementation and it looks like we call s2s before each call anyway, so putting that call in the interceptor doesn't change much. We just need to make sure that the feign interceptor is not used in any other feign clients. |
JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/LAU-1325
Change description
Add Interceptor
Does this PR introduce a breaking change? (check one with "x")