PHP Classes

Suggestion : Cert Files, Json decoding

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  Learn with a PHP OAut...  >  All threads  >  Suggestion : Cert Files, Json decoding  >  (Un) Subscribe thread alerts  
Subject:Suggestion : Cert Files, Json decoding
Summary:Options for JSON decoding and SSL certs
Messages:2
Author:AM
Date:2016-05-12 01:33:40
 

  1. Suggestion : Cert Files, Json decoding   Reply   Report abuse  
Picture of AM AM - 2016-05-12 01:33:40
First off thank-you for an awesome library

I am currently connecting to the Xero API using the private setting.

The private setting requires me to to use a self generated x509 cert which I upload the public key to Xero.

I would love the ability to be able to pass the keys into the oauth class to make the connection.

From what I can tell it requires sending
request_arguments['SSLCertificateFile']
request_arguments['SSLKeyFile']
to the http class.

My second request is the ability to return the results of the API call as an array and not an object. Could this be a setting in the oauth_class and for the json_decode. Currently I am modifying oath_client to achieve this but it means every time I upgrade the class I have to remember to do this.

Thanks Again for a great library
Andrew

  2. Re: Suggestion : Cert Files, Json decoding   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-05-12 02:05:23 - In reply to message 1 from AM
Regarding certificates, you should be able to pass them using the http_arguments variable.

As for converting JSON response objects to arrays, there is the ConvertObjects parameter. It only converts the top level object. Just let me know if that is enough for your purposes.

In any case always take at the documentation to see if what you need is already implemented. Otherwise post a new topic here.

phpclasses.org/package/7700-PHP-Aut ...