Skip to content

Conversation

@priyankaVerma21
Copy link
Contributor

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")

[ ] Yes
[x] No

@priyankaVerma21 priyankaVerma21 changed the title Add Interceptorto overide token LAU-1325 Add Interceptor overide token Dec 4, 2025
@priyankaVerma21 priyankaVerma21 changed the title LAU-1325 Add Interceptor overide token LAU-1325 Add Interceptor override token Dec 4, 2025
@priyankaVerma21 priyankaVerma21 changed the title LAU-1325 Add Interceptor override token LAU-1325 Add Interceptor to override token Dec 4, 2025
return template -> {
template.removeHeader("ServiceAuthorization");
String token = securityUtils.getServiceAuthorization();
template.header("ServiceAuthorization", token);
Copy link
Contributor

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.

Copy link
Contributor

@rapolaskaseliscgi rapolaskaseliscgi left a 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.

Copy link
Collaborator

@RebeccaBaker RebeccaBaker left a 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

@rapolaskaseliscgi
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants