我正在使用我在GitHub上找到的Client来使用JIRA的REST API并使用oAuth进行授权。 JIRA返回无效签名。这是我的代码:
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use App\Jira\JiraClient;
class RestAPIController extends BaseController
{
use DispatchesJobs;
public function get()
{
$config['base_url']= env('JIRA_ADRESS');
$config['private_key']= app_path().env('PRIVATE_KEY');
$config['consumer_key']= env('CONSUMER_KEY');
$config['consumer_secret']= app_path().env('CONSUMER_SECRET');
$config['callback_url']= env('CALLBACK');
$client = new JiraClient($config);
$client->init();
//$issue = $client -> getIssue('TP-115');
return view('issue',['issue' => $issue]);
}
}
这是返回的错误:
Error
我使用这些属性:
JIRA_ADRESS=localhost:8015/
PRIVATE_KEY=\Jira\Api\Authentication\jira.pem
CONSUMER_SECRET=qwerty123
CONSUMER_KEY=hardcoded-consumer
CALLBACK=http://localhost:8000/get