I am trying to login to my media wiki from my wordpress. I have WPOauthServer runing on my WordPress (Wordpress plugin). I want that my users only login to wordpress and from there they can go to wiki without loging to wiki again. The server is working fine i have tested by sending curl request and post i am able to get the authentication token.
I have abutton on my wordpress with wikis client id and details:
<a href="[https://XXXXXXX.de/oauth/authorize?response_type=code&client_id=XXXXXXXXX https://XXXXXXX.de/oauth/authorize?response_type=code&client_id=XXXX]&state=123">
When i opne the authorization link, i land on:
https://wiki.XXXXXXXXXXXXX.de/wiki/Special:OAuth2Client/callback?code=farkmm4ttuwxnne8a9firwtdikmite788hwpyhzg&state=123 and here i get a "Fatal exception of type "GuzzleHttp\Exception\RequestException" upon digging i found out that this exception is caused in `AbstractProvider.php` in the sendRequest function in the following line `$response = $this->getHttpClient()->send($request);`
protected function sendRequest(RequestInterface $request)
{
try {
var_dump($request);
$response = $this->getHttpClient()->send($request);
var_dump($response);
} catch (BadResponseException $e) {
$response = $e->getResponse();
}
return $response;
}
I think may be there is something wrong with my request, my request is as follows
/var/www/mediawiki/w/extensions/MW-OAuth2Client/vendors/oauth2-client/src/Provider/AbstractProvider.php:629:
object(GuzzleHttp\Psr7\Request)[278]
private 'method' => string 'POST' (length=4)
private 'requestTarget' => null
private 'uri' =>
object(GuzzleHttp\Psr7\Uri)[279]
private 'scheme' => string 'https' (length=5)
private 'userInfo' => string '' (length=0)
private 'host' => string 'XXXXXXX.de' (length=13)
private 'port' => null
private 'path' => string '/oauth/token/' (length=13)
private 'query' => string '' (length=0)
private 'fragment' => string '' (length=0)
private 'headers' =>
array (size=2)
'Host' =>
array (size=1)
0 => string 'XXXXXXX.de' (length=13)
'content-type' =>
array (size=1)
0 => string 'application/x-www-form-urlencoded' (length=33)
private 'headerNames' =>
array (size=2)
'content-type' => string 'content-type' (length=12)
'host' => string 'Host' (length=4)
private 'protocol' => string '1.1' (length=3)
private 'stream' =>
object(GuzzleHttp\Psr7\Stream)[287]
private 'stream' => resource(18, stream)
private 'size' => null
private 'seekable' => boolean true
private 'readable' => boolean true
private 'writable' => boolean true
private 'uri' => string 'php://temp' (length=10)
private 'customMetadata' =>
array (size=0)
empty