aditya-rewari / InterceptorPOC

This POC examplifies to modify Request and Response objects through Interceptors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This POC examplifies to modify Request and Response objects through Interceptors

  1. For modifying request object, we are Encrypting our request object before sending.
    For modifying our response object, we are decrypting the received response. The decrypted response is then used to prepare the new response object which will be returned.

  2. Prepared two Spring beans of RestTemplate
    a) RegularRestTemplate Bean: This will be used in project where Interceptor is not required while aking REST calls
    b) InterceptedRestTemple Bean: To be used for making REST calls, which are to be intercepted for change in Request Response objects

  3. Custom Interceptor is also perpared, where the request response objects are modified
    Encryption applied on request object before sending as payload
    Decryption applied on received response.
    A new response object prepared using decrypted response and sent to the service making call.

About

This POC examplifies to modify Request and Response objects through Interceptors


Languages

Language:Java 100.0%