Update JsonRPC library
This commit is contained in:
parent
36bdcf193b
commit
1936a74cb3
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Kanboard\Api;
|
||||
|
||||
use JsonRPC\AuthenticationFailure;
|
||||
use JsonRPC\Exception\AuthenticationFailureException;
|
||||
|
||||
/**
|
||||
* Base class
|
||||
|
|
@ -32,7 +32,7 @@ class Auth extends Base
|
|||
$this->checkProcedurePermission(false, $method);
|
||||
} else {
|
||||
$this->logger->error('API authentication failure for '.$username);
|
||||
throw new AuthenticationFailure('Wrong credentials');
|
||||
throw new AuthenticationFailureException('Wrong credentials');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Kanboard\Api;
|
||||
|
||||
use JsonRPC\AccessDeniedException;
|
||||
use JsonRPC\Exception\AccessDeniedException;
|
||||
|
||||
/**
|
||||
* Base class
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
"christian-riesen/otp" : "1.4",
|
||||
"eluceo/ical": "0.8.0",
|
||||
"erusev/parsedown" : "1.6.0",
|
||||
"fguillot/json-rpc" : "1.0.3",
|
||||
"fguillot/json-rpc" : "1.1.0",
|
||||
"fguillot/picodb" : "1.0.8",
|
||||
"fguillot/simpleLogger" : "1.0.0",
|
||||
"fguillot/simple-validator" : "1.0.0",
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "ecdd93c089273876816339ff22d67cc7",
|
||||
"content-hash": "a5edc6f9c9ae2cd356e3f8ac96ef5532",
|
||||
"hash": "715601e3833e0ee04d8d00d266302f8b",
|
||||
"content-hash": "ef38cdd1e92bd2cd299db9c6d429d24f",
|
||||
"packages": [
|
||||
{
|
||||
"name": "christian-riesen/base32",
|
||||
|
|
@ -203,16 +203,16 @@
|
|||
},
|
||||
{
|
||||
"name": "fguillot/json-rpc",
|
||||
"version": "v1.0.3",
|
||||
"version": "v1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fguillot/JsonRPC.git",
|
||||
"reference": "0a77cd311783431c851e4c8eed33858663c17277"
|
||||
"reference": "e915dab71940e7ac251955c785570048f460d332"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fguillot/JsonRPC/zipball/0a77cd311783431c851e4c8eed33858663c17277",
|
||||
"reference": "0a77cd311783431c851e4c8eed33858663c17277",
|
||||
"url": "https://api.github.com/repos/fguillot/JsonRPC/zipball/e915dab71940e7ac251955c785570048f460d332",
|
||||
"reference": "e915dab71940e7ac251955c785570048f460d332",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -235,7 +235,7 @@
|
|||
],
|
||||
"description": "Simple Json-RPC client/server library that just works",
|
||||
"homepage": "https://github.com/fguillot/JsonRPC",
|
||||
"time": "2015-09-19 02:27:10"
|
||||
"time": "2016-04-27 02:48:10"
|
||||
},
|
||||
{
|
||||
"name": "fguillot/picodb",
|
||||
|
|
|
|||
|
|
@ -35,15 +35,15 @@ abstract class Base extends PHPUnit_Framework_TestCase
|
|||
{
|
||||
$this->app = new JsonRPC\Client(API_URL);
|
||||
$this->app->authentication('jsonrpc', API_KEY);
|
||||
// $this->app->debug = true;
|
||||
$this->app->getHttpClient()->withDebug();
|
||||
|
||||
$this->admin = new JsonRPC\Client(API_URL);
|
||||
$this->admin->authentication('admin', 'admin');
|
||||
// $this->admin->debug = true;
|
||||
$this->admin->getHttpClient()->withDebug();
|
||||
|
||||
$this->user = new JsonRPC\Client(API_URL);
|
||||
$this->user->authentication('user', 'password');
|
||||
// $this->user->debug = true;
|
||||
$this->user->getHttpClient()->withDebug();
|
||||
}
|
||||
|
||||
protected function getProjectId()
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class MeTest extends Base
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException JsonRPC\AccessDeniedException
|
||||
* @expectedException JsonRPC\Exception\AccessDeniedException
|
||||
*/
|
||||
public function testNotAllowedAppProcedure()
|
||||
{
|
||||
|
|
@ -23,7 +23,7 @@ class MeTest extends Base
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException JsonRPC\AccessDeniedException
|
||||
* @expectedException JsonRPC\Exception\AccessDeniedException
|
||||
*/
|
||||
public function testNotAllowedUserProcedure()
|
||||
{
|
||||
|
|
@ -31,7 +31,7 @@ class MeTest extends Base
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException JsonRPC\AccessDeniedException
|
||||
* @expectedException JsonRPC\Exception\AccessDeniedException
|
||||
*/
|
||||
public function testNotAllowedProjectForUser()
|
||||
{
|
||||
|
|
@ -140,7 +140,7 @@ class MeTest extends Base
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException JsonRPC\AccessDeniedException
|
||||
* @expectedException JsonRPC\Exception\AccessDeniedException
|
||||
*/
|
||||
public function testGetAdminTask()
|
||||
{
|
||||
|
|
@ -148,7 +148,7 @@ class MeTest extends Base
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException JsonRPC\AccessDeniedException
|
||||
* @expectedException JsonRPC\Exception\AccessDeniedException
|
||||
*/
|
||||
public function testGetProjectActivityDenied()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue