Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('token_authentication');

$treeBuilder = new TreeBuilder('token_authentication');
$rootNode = $treeBuilder->getRootNode();

$rootNode
->children()
Expand Down
8 changes: 4 additions & 4 deletions Service/Listener/ExceptionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Youshido\TokenAuthenticationBundle\Service\Listener;

use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\HttpKernel\Event\ExceptionEvent;

/**
* Date: 2/3/16
Expand All @@ -20,13 +20,13 @@ public function __construct($tokenRequestHeader)
$this->tokenRequestHeader = $tokenRequestHeader;
}

public function onKernelException(GetResponseForExceptionEvent $event)
public function onKernelException(ExceptionEvent $event)
{
$response = new JsonResponse([
'errors' => [
[
'message' => $event->getException()->getMessage(),
'code' => $event->getException()->getCode()
'message' => $event->getThrowable()->getMessage(),
'code' => $event->getThrowable()->getCode()
]
]
], 200, [
Expand Down
14 changes: 5 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
{
"name": "youshido/token-authenticator",
"name": "ozznest/token-authenticator",
"type": "symfony-bundle",
"description": "Symfony bundle to allow you token based authentication",
"keywords": ["token", "auth", "authentication", "symfony", "bundle"],
"homepage": "https://github.com/Youshido/TokenAuthenticationBundle",
"license": "MIT",
"version": "1.1.1",
"version": "1.3.1",
"authors": [
{
"name": "Alexandr Viniychuk",
"email": "a@viniychuk.com"
},
{
"name": "Portey Vasil",
"email": "portey@gmail.com"
"name": "Olexiy Chuiko",
"email": "oznest@i.ua"
}
],
"require": {
"php": ">=5.5",
"symfony/framework-bundle": "~2.3|~3.0|~4.0"
"symfony/framework-bundle": "~2.3|~3.0|~4.0|~5.0"
},
"autoload": {
"psr-4": { "Youshido\\TokenAuthenticationBundle\\": "" }
Expand Down