/// <summary>
        /// Processes the API response JSON result
        /// </summary>
        /// <typeparam name="T">Object type to deserialize the result to</typeparam>
        /// <param name="result">JSON result</param>
        /// <returns>Deserialized object</returns>
        public T ProcessResult <T>(String result)
        {
            CheckForErrorsInResponse(result);

            T data = JsonConvert.DeserializeObject <T>(result);

            if (data is SignedResponse)
            {
                SignedResponse signedResponse = data as SignedResponse;
                signedResponse.ValidateSignature(SigningKey);
            }
            return(data);
        }
Exemple #2
0
 /// <summary>
 /// Validates a SignedResponse object
 /// </summary>
 /// <param name="signedResponse">Signed response</param>
 public void ValidateSignature(SignedResponse signedResponse)
 {
     signedResponse.ValidateSignature(httpClient.SigningKey);
 }