Skip to content

feat: Implement ResponseInterceptor#341

Open
sakinsete wants to merge 2 commits into
ForgeRock:developfrom
sakinsete:develop
Open

feat: Implement ResponseInterceptor#341
sakinsete wants to merge 2 commits into
ForgeRock:developfrom
sakinsete:develop

Conversation

@sakinsete

Copy link
Copy Markdown

Description

This commit introduces the ResponseInterceptor protocol and its registry, enabling developers to intercept and modify SDK-generated responses.

Key changes:

  • Added ResponseInterceptor.swift defining the protocol for response interception.
  • Added ResponseInterceptorRegistry.swift in FRCore to manage an array of ResponseInterceptor instances.
  • Added FRResponseInterceptorRegistry.swift in FRAuth as a wrapper for the FRCore registry.
  • Updated RestClient.swift to incorporate response interception logic, similar to existing request interception.
  • Made Response struct properties public for accessibility.
  • Renamed interceptors to requestInterceptors in RestClient.swift for clarity.
  • Updated project files to include the new response interceptor files.

This commit introduces the `ResponseInterceptor` protocol and its registry, enabling developers to intercept and modify SDK-generated responses.

Key changes:
- Added `ResponseInterceptor.swift` defining the protocol for response interception.
- Added `ResponseInterceptorRegistry.swift` in FRCore to manage an array of `ResponseInterceptor` instances.
- Added `FRResponseInterceptorRegistry.swift` in FRAuth as a wrapper for the FRCore registry.
- Updated `RestClient.swift` to incorporate response interception logic, similar to existing request interception.
- Made `Response` struct properties public for accessibility.
- Renamed `interceptors` to `requestInterceptors` in `RestClient.swift` for clarity.
- Updated project files to include the new response interceptor files.
@george-bafaloukas-forgerock

Copy link
Copy Markdown
Contributor

Hi @sakinsete thank you for creating this PR. We will be reviewing and posting our updates here. Apologies for the late reply. Can you please also provide some further details and a use case on why this feature is needed and the use cases you are trying to solve?

Kind regards,
George

@sakinsete

sakinsete commented Aug 14, 2025

Copy link
Copy Markdown
Author

@george-bafaloukas-forgerock So we have a scenario where we are intercepting the response from Forgerock and sending this to shape sdk from F5 that we use internally for security purpose.

@sakinsete

Copy link
Copy Markdown
Author

@george-bafaloukas-forgerock Please is there any update on reviewing this PR?

Signed-off-by: sakinsete <sakinsete@westjet.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants