Class: AuthJWEUtility

Inherits:
Object
  • Object
show all
Defined in:
lib/AuthenticationSDK/util/JWEUtility.rb

Class Method Summary collapse

Class Method Details

.decrypt_jwe_using_pem(merchant_config, encoded_response) ⇒ Object



9
10
11
12
13
# File 'lib/AuthenticationSDK/util/JWEUtility.rb', line 9

def self.decrypt_jwe_using_pem(merchant_config, encoded_response)
  cache_obj = ActiveSupport::Cache::MemoryStore.new
  key = Cache.new.fetchPEMFileForNetworkTokenization(merchant_config.pemFileDirectory, cache_obj)
  return JOSE::JWE.block_decrypt(key, encoded_response).first
end