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

DEPRECATED: This method has been marked as Deprecated and will be removed in coming releases. Use decrypt_jwe_using_private_key() instead.



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

def self.decrypt_jwe_using_pem(merchant_config, encoded_response)
  warn("[DEPRECATED] `decrypt_jwe_using_pem()` method is deprecated and will be removed in coming releases. Use `decrypt_jwe_using_private_key()` instead.")
  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

.decrypt_jwe_using_private_key(private_key, encoded_response) ⇒ Object



16
17
18
# File 'lib/AuthenticationSDK/util/JWEUtility.rb', line 16

def self.decrypt_jwe_using_private_key(private_key, encoded_response)
  return JOSE::JWE.block_decrypt(private_key, encoded_response).first
end