Module: Yoti::Client
- Defined in:
- lib/yoti/client.rb
Overview
Handles all the publicly accesible Yoti methods for geting data using an encrypted connect token
Class Method Summary collapse
-
.get_activity_details(encrypted_connect_token) ⇒ Object
Performs all the steps required to get the decrypted profile from an API request.
Class Method Details
.get_activity_details(encrypted_connect_token) ⇒ Object
Performs all the steps required to get the decrypted profile from an API request
8 9 10 11 12 13 14 15 |
# File 'lib/yoti/client.rb', line 8 def self.get_activity_details(encrypted_connect_token) receipt = Yoti::Request.new(encrypted_connect_token).receipt encrypted_data = Protobuf.current_user(receipt) unwrapped_key = Yoti::SSL.decrypt_token(receipt['wrapped_receipt_key']) decrypted_data = Yoti::SSL.decipher(unwrapped_key, encrypted_data.iv, encrypted_data.cipher_text) decrypted_profile = Protobuf.attribute_list(decrypted_data) ActivityDetails.new(receipt, decrypted_profile) end |