collegeman / php-tent-client Goto Github PK
View Code? Open in Web Editor NEWA library for connecting to Tent servers, and a Console app for browsing server content
A library for connecting to Tent servers, and a Console app for browsing server content
I think there is a common error in the code when you are building the headers and use curl / curl_setopt_array
You have no keys in the array, only strings
E.g.
array(
'Content-Type:application/vnd.tent.v0+json',
'Accept:application/vnd.tent.v0+json'
)
That would send header
0:'Content-Type:application/vnd.tent.v0+json' etc.
So it should be e.g.
array(
'Content-Type' => 'application/vnd.tent.v0+json',
'Accept' => 'application/vnd.tent.v0+json'
)
Please make your classes follow PSR-0 and add another vendor-namespace, like
lib/TentPHP/Application.php (TentPHP_Application or TentPHP\Application)
See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
Also a composer.json file to make this library distributable through composer and packagist.org. Composer is a new package management tool that already allows to install over 2000 PHP packages and is used by many major libraries such as Drupal, Symfony2, Zend Framework2.
http://getcomposer.org/
http://www.packagist.org
If you want i could contribute both changes, i really want to see a high quality tent php library early on and this one here is much better than the other one I found.
Hey there,
callback receives code and state but the response of
'/apps/'.$this->getClientId().'/authorizations'
returns an error saying
'error' => 'Invalid MAC Key ID'
Constructor validates entity using:
filter_var($entity, FILTER_VALIDATE_URL)
You should probably also validate the scheme expected using parse_url() to narrow down what's allowed. The function above would validate javascript:, php: and other schemes so basically let's anything that could be construed as a URI get through.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.