Skip to content

Instantly share code, notes, and snippets.

View kamaulynder's full-sized avatar
💭
Need great Female Tech Talent, talk to me!!

Linda Kamau kamaulynder

💭
Need great Female Tech Talent, talk to me!!
View GitHub Profile
[Request headers] {"Authorization":"Bearer usertoken","Content-Type":"application/json"}
[Request] DELETE http://api.rollcall.dev/api/v1/users/1 []
[Response] {"message":"Trying to get property of non-object","status_code":500,"debug":{"line":25,"file":"/home/vagrant/rollcall/app/Traits/UserAccess.php","class":"ErrorException","trace":["#0 /home/vagrant/rollcall/app/Traits/UserAccess.php(25): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'Trying to get p...', '/home/vagrant/r...', 25, Array)","#1 /home/vagrant/rollcall/app/Http/Requests/User/GetUserRequest.php(20): RollCall\\Http\\Requests\\User\\GetUserRequest->isAdmin()","#2 [internal function]: RollCall\\Http\\Requests\\User\\GetUserRequest->authorize()","#3 /home/vagrant/rollcall/vendor/laravel/framework/src/Illuminate/Container/Container.php(507): call_user_func_array(Array, Array)","#4 /home/vagrant/rollcall/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php(108): Illuminate\\Container\\Container->call(Arra
1) Failed to create a contact as admin in ContactCest::createContact (/home/vagrant/rollcall/tests/api/ContactCest.php)
Couldn't see response contains json {"receive":1,"type":"email","contact":"[email protected]","user":{"id":3}}:
Response JSON contains provided
- array (
0 =>
array (
'receive' => 1,
'type' => 'email',
'contact' => '[email protected]',
'user' =>
public function authorize()
{
$user_id = $this->route('users');
return User::where('id', $user_id)
->where('id', Auth::id()->exists());
}
{"message":"The resource owner or authorization server denied the request.","status_code":401,"debug":{"line":86,"file":"\/home\/vagrant\/rollcall\/vendor\/dingo\/api\/src\/Auth\/Provider\/OAuth2.php","class":"Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException","trace":["#0 \/home\/vagrant\/rollcall\/vendor\/dingo\/api\/src\/Auth\/Auth.php(82): Dingo\\Api\\Auth\\Provider\\OAuth2->authenticate(Object(Dingo\\Api\\Http\\Request), Object(Dingo\\Api\\Routing\\Route))","#1 \/home\/vagrant\/rollcall\/vendor\/dingo\/api\/src\/Http\/Middleware\/Auth.php(50): Dingo\\Api\\Auth\\Auth->authenticate(Array)","#2 [internal function]: Dingo\\Api\\Http\\Middleware\\Auth->handle(Object(Dingo\\Api\\Http\\Request), Object(Closure))","#3 \/home\/vagrant\/rollcall\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(124): call_user_func_array(Array, Array)","#4 [internal function]: Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Dingo\\Api\\Http\\Request))","#5 \/home\/vagran
{"message":"The resource owner or authorization server denied the request.","status_code":401,"debug":{"line":86,"file":"\/home\/vagrant\/rollcall\/vendor\/dingo\/api\/src\/Auth\/Provider\/OAuth2.php","class":"Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException","trace":["#0 \/home\/vagrant\/rollcall\/vendor\/dingo\/api\/src\/Auth\/Auth.php(82): Dingo\\Api\\Auth\\Provider\\OAuth2->authenticate(Object(Dingo\\Api\\Http\\Request), Object(Dingo\\Api\\Routing\\Route))","#1 \/home\/vagrant\/rollcall\/vendor\/dingo\/api\/src\/Http\/Middleware\/Auth.php(50): Dingo\\Api\\Auth\\Auth->authenticate(Array)","#2 [internal function]: Dingo\\Api\\Http\\Middleware\\Auth->handle(Object(Dingo\\Api\\Http\\Request), Object(Closure))","#3 \/home\/vagrant\/rollcall\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(124): call_user_func_array(Array, Array)","#4 [internal function]: Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Dingo\\Api\\Http\\Request))","#5 \/home\/vagran
"message":"The user credentials were incorrect.","status_code":500,"debug":{"line":132,"file":"\/home\/vagrant\/rollcall\/vendor\/league\/oauth2-server\/src\/Grant\/PasswordGrant.php","class":"League\\OAuth2\\Server\\Exception\\InvalidCredentialsException","trace":["#0 \/home\/vagrant\/rollcall\/vendor\/league\/oauth2-server\/src\/AuthorizationServer.php(275): League\\OAuth2\\Server\\Grant\\PasswordGrant->completeFlow()","#1 \/home\/vagrant\/rollcall\/vendor\/lucadegasperi\/oauth2-server-laravel\/src\/Authorizer.php(117): League\\OAuth2\\Server\\AuthorizationServer->issueAccessToken()","#2 \/home\/vagrant\/rollcall\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/Facades\/Facade.php(213): LucaDegasperi\\OAuth2Server\\Authorizer->issueAccessToken()","#3 \/home\/vagrant\/rollcall\/app\/Http\/routes\/app.php(20): Illuminate\\Support\\Facades\\Facade::__callStatic('issueAccessToke...', Array)","#4 \/home\/vagrant\/rollcall\/app\/Http\/routes\/app.php(20): LucaDegasperi\\OAuth2Server\\Facades\\Authorizer::is
{"message":"The user credentials were incorrect.","status_code":500,"debug":{"line":132,"file":"\/home\/vagrant\/rollcall\/vendor\/league\/oauth2-server\/src\/Grant\/PasswordGrant.php","class":"League\\OAuth2\\Server\\Exception\\InvalidCredentialsException","trace":["#0 \/home\/vagrant\/rollcall\/vendor\/league\/oauth2-server\/src\/AuthorizationServer.php(275): League\\OAuth2\\Server\\Grant\\PasswordGrant->completeFlow()","#1 \/home\/vagrant\/rollcall\/vendor\/lucadegasperi\/oauth2-server-laravel\/src\/Authorizer.php(117): League\\OAuth2\\Server\\AuthorizationServer->issueAccessToken()","#2 \/home\/vagrant\/rollcall\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/Facades\/Facade.php(213): LucaDegasperi\\OAuth2Server\\Authorizer->issueAccessToken()","#3 \/home\/vagrant\/rollcall\/app\/Http\/routes\/app.php(20): Illuminate\\Support\\Facades\\Facade::__callStatic('issueAccessToke...', Array)","#4 \/home\/vagrant\/rollcall\/app\/Http\/routes\/app.php(20): LucaDegasperi\\OAuth2Server\\Facades\\Authorizer::i
[2016-03-18 10:55:29] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class '\RollCall\User' not found' in /home/vagrant/rollcall/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php:126
Stack trace:
#0 /home/vagrant/rollcall/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(133): Symfony\Component\Debug\Exception\FatalErrorException->__construct()
#1 /home/vagrant/rollcall/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(118): Illuminate\Foundation\Bootstrap\HandleExceptions->fatalExceptionFromError()
#2 /home/vagrant/rollcall/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(0): Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown()
#3 /home/vagrant/rollcall/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php(92): Illuminate\Auth\EloquentUserProvider->createModel()
#4 /home/vagrant/rollcall/vendor/laravel/framework/src/Il
<?php
namespace RollCall\Services;
use RollCall\Contracts\Repositories\UsersRepository;
class PasswordGrantVerifier
{
/**
* @var UsersRepository
*/
[2016-03-18 09:56:31] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class '\RollCall\User' not found' in /home/vagrant/rollcall/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php:126
Stack trace:
#0 /home/vagrant/rollcall/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(133): Symfony\Component\Debug\Exception\FatalErrorException->__construct()
#1 /home/vagrant/rollcall/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(118): Illuminate\Foundation\Bootstrap\HandleExceptions->fatalExceptionFromError()
#2 /home/vagrant/rollcall/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(0): Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown()
#3 /home/vagrant/rollcall/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php(92): Illuminate\Auth\EloquentUserProvider->createModel()
#4 /home/vagrant/rollcall/vendor/laravel/framework/src/Il