Sha256: 8081cefffbfdc54f01038650b6463d8b136b82749ea55ce53e460f5b489220eb
Contents?: true
Size: 824 Bytes
Versions: 5
Compression:
Stored size: 824 Bytes
Contents
module Yoti # Manage the API's profile requests class ProfileRequest # # @param [String] encrypted_connect_token # def initialize(encrypted_connect_token) @encrypted_connect_token = encrypted_connect_token @request = request end # @return [String] a JSON representation of the profile response receipt def receipt JSON.parse(@request.body)['receipt'] end private def request Yoti::Request .builder .with_http_method('GET') .with_base_url(Yoti.configuration.api_endpoint) .with_endpoint("profile/#{Yoti::SSL.decrypt_token(@encrypted_connect_token)}") .with_query_param('appId', Yoti.configuration.client_sdk_id) .with_header('X-Yoti-Auth-Key', Yoti::SSL.auth_key_from_pem) .build end end end
Version data entries
5 entries across 5 versions & 1 rubygems