Class: McAPI::Encryption::OpenAPIInterceptor
- Inherits:
-
Object
- Object
- McAPI::Encryption::OpenAPIInterceptor
- Defined in:
- lib/mcapi/encryption/openapi_interceptor.rb
Overview
Service class that provide interceptor facilities for OpenApi swagger client
Class Method Summary collapse
-
.install_field_level_encryption(swagger_client, config) ⇒ Object
Install the field level encryption in the OpenAPI HTTP client adding encryption/decryption capabilities for the request/response payload.
Class Method Details
.install_field_level_encryption(swagger_client, config) ⇒ Object
Install the field level encryption in the OpenAPI HTTP client adding encryption/decryption capabilities for the request/response payload.
20 21 22 23 24 25 26 27 28 |
# File 'lib/mcapi/encryption/openapi_interceptor.rb', line 20 def install_field_level_encryption(swagger_client, config) fle = McAPI::Encryption::FieldLevelEncryption.new(config) # Hooking ApiClient#call_api hook_call_api fle # Hooking ApiClient#deserialize hook_deserialize fle McAPI::Encryption::OpenAPIInterceptor.init_call_api swagger_client McAPI::Encryption::OpenAPIInterceptor.init_deserialize swagger_client end |