Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit df9841b

Browse files
committed
✨ Mastodon: auth headers not used
1 parent d473b62 commit df9841b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Mastodon/Mastodon.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/**
33
* Class Mastodon
44
*
5-
* @link https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md
6-
* @link https://github.com/tootsuite/documentation/blob/master/Using-the-API/OAuth-details.md
5+
* @link https://docs.joinmastodon.org/client/intro/
6+
* @link https://docs.joinmastodon.org/methods/apps/oauth/
77
*
88
* @created 19.08.2018
99
* @author smiley <smiley@chillerlan.net>
@@ -104,7 +104,7 @@ class Mastodon extends OAuth2Provider implements CSRFToken, TokenRefresh{
104104
public const SCOPE_PUSH = 'push';
105105

106106
protected ?string $endpointMap = MastodonEndpoints::class;
107-
protected ?string $apiDocs = 'https://docs.joinmastodon.org/api/guidelines/';
107+
protected ?string $apiDocs = 'https://docs.joinmastodon.org/api/';
108108

109109
protected array $defaultScopes = [
110110
Mastodon::SCOPE_READ,
@@ -155,10 +155,6 @@ public function getAccessToken(string $code, string $state = null):AccessToken{
155155
->withHeader('Accept-Encoding', 'identity')
156156
->withBody($this->streamFactory->createStream(http_build_query($body, '', '&', PHP_QUERY_RFC1738)));
157157

158-
foreach($this->authHeaders as $header => $value){
159-
$request = $request->withHeader($header, $value);
160-
}
161-
162158
$token = $this->parseTokenResponse($this->http->sendRequest($request));
163159
// store the instance the token belongs to
164160
$token->extraParams = array_merge($token->extraParams, ['instance' => $this->instance]);

0 commit comments

Comments
 (0)