Open
Description
During user authentication using the AuthTokenController@store I need to send the user as a json response but the token in the header.
So I need something like this instead of the current response:
return Response::json(array('token' => $serializedToken, 'user' => $user->toArray()))->header('X-Auth-Token', $serializedToken);
What is the best way to extend and include this functionality. I extended the controller (CustomAuthTokenController) in app/controllers and overrode the store() function, then updated the routes.php to use the extended controller, but I'm new to Laravel so I don't think I'm doing this right. I get this response:
error: {type: "Illuminate\Container\BindingResolutionException",…}
file: "/home/vagrant/Code/wedding/vendor/laravel/framework/src/Illuminate/Container/Container.php"
line: 513
message: "Target [Tappleby\AuthToken\AuthTokenProviderInterface] is not instantiable."
type: "Illuminate\Container\BindingResolutionException"
Metadata
Metadata
Assignees
Labels
No labels