n1te1337 / apigility-blog-example Goto Github PK
View Code? Open in Web Editor NEWSimple example of a restful blog API built using Apigility
License: BSD 3-Clause "New" or "Revised" License
Simple example of a restful blog API built using Apigility
License: BSD 3-Clause "New" or "Revised" License
File RegistrationEntity in method setLastName($lastName);
public function setLastName($lastName)
{
$this->lastName = $lastName;
return $this;
}
it should be with lowercase $this->lastname = $lastName;
https://groups.google.com/a/zend.com/forum/#!msg/apigility-users/X87BPvICMHE/ULg395IxNB4J
to rollback:
composer require zfcampus/zf-apigility-admin:1.0.4
Hi there,
I'm really despaired and looking for solution
I created latest (dev-master) apigility/zf project also tried with this blog example but I always end up with 403 when trying to access user resource
my steps (except correctly configuring database and configs):
POST: http://test2.lc/auth/registration
{
"username": "[email protected]",
"password": "testpass",
"firstname": "Pav",
"lastname": "Zwierzynski"
}
response:
{
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Success",
"status": 200,
"detail": "The entity has been created"
}
POST: http://test2.lc/auth/login
{
"username": "[email protected]",
"password": "testpass",
"grant_type": "password",
"client_id": "webapp"
}
response:
{
"access_token": "30f03a9d46cd3698bb0ffd091fbb37fe3557fae8",
"expires_in": 3600,
"token_type": "Bearer",
"scope": null,
"refresh_token": "6dc6166d948072962c0a8142b1f5162bafadcf36"
}
POST: http://test2.lc/post
(header Authorization: Bearer 53f382dfbb9fa27f12e268de7a02c8b7613a67bc)
{
"postTitle": "Sample post",
"postBody": "This is just a sample post to see if the API works"
}
response:
{
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Forbidden",
"status": 403,
"detail": "Forbidden"
}
if anyone can help I'm inviting for 10 beers!
I have been trying to work this out with the new version of apigility with no avail.
needs an update.
Perhaps this should be added to documentation:
user.global.php and oauth2.global.php both contain db connection info.
If i perform a post Request with Content-Type: application/json to my http://example.domain.com/auth/registration
I always get this error:
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Internal Server Error", "status": 500, "detail": "Listed input filter "Auth\V1\Rest\Registration\Validator" does not exist; cannot validate request" }
The inputfilter won't exist I understand so far. But it is not included in git clone. What have I done wrong?
I get the project running with inserting my own db credentials, and executing:
./composer.phar install
after that I simply started with:
php -S 0.0.0.0:8888 -t public public/index.php
Best regards Daniel
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.