PHP Classes

2-legged bitbucket authorization

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  How to Implement PHP ...  >  All threads  >  2-legged bitbucket authorization  >  (Un) Subscribe thread alerts  
Subject:2-legged bitbucket authorization
Summary:cannot do 2-legged authorization
Messages:12
Author:Martin Babinec
Date:2015-04-09 21:56:24
 
  1 - 10   11 - 12  

  11. Re: 2-legged bitbucket authorization   Reply   Report abuse  
Picture of Bart R Bart R - 2017-03-15 00:55:15 - In reply to message 10 from Manuel Lemos
Hi Manuel,

I'm trying to set up an application that uses 2-legged authorization to connect to a service.

I added an entry in the .json configuration file for the service that looks like this :

MyService
{
"oauth_version": "1.0",
"request_token_url": "https://.....",
"access_token_url": "https://.....",
"grant_type": "client_credentials",
"token_request_method":"POST",
"dialog_url":"2legged"
}

Calling $client->Initialiaze(); returns true;
However calling $client->Process(); results in the following error :

"it was not possible to access the OAuth access token: it was returned an unexpected response status 400"

Do you have any idea what could be going wrong at this point ?

Kind regards
Bart

  12. Re: 2-legged bitbucket authorization   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2017-03-15 04:23:36 - In reply to message 11 from Bart R
It would be good to check the HTTP response to see if it is returning any error messages. You can enable the class debug support and check the PHP error log.

The auth_version also seems it should be 1.0a.

 
  1 - 10   11 - 12