|
2 | 2 | /** |
3 | 3 | * Class Mastodon |
4 | 4 | * |
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/ |
7 | 7 | * |
8 | 8 | * @created 19.08.2018 |
9 | 9 | * @author smiley <smiley@chillerlan.net> |
@@ -104,7 +104,7 @@ class Mastodon extends OAuth2Provider implements CSRFToken, TokenRefresh{ |
104 | 104 | public const SCOPE_PUSH = 'push'; |
105 | 105 |
|
106 | 106 | protected ?string $endpointMap = MastodonEndpoints::class; |
107 | | - protected ?string $apiDocs = 'https://docs.joinmastodon.org/api/guidelines/'; |
| 107 | + protected ?string $apiDocs = 'https://docs.joinmastodon.org/api/'; |
108 | 108 |
|
109 | 109 | protected array $defaultScopes = [ |
110 | 110 | Mastodon::SCOPE_READ, |
@@ -155,10 +155,6 @@ public function getAccessToken(string $code, string $state = null):AccessToken{ |
155 | 155 | ->withHeader('Accept-Encoding', 'identity') |
156 | 156 | ->withBody($this->streamFactory->createStream(http_build_query($body, '', '&', PHP_QUERY_RFC1738))); |
157 | 157 |
|
158 | | - foreach($this->authHeaders as $header => $value){ |
159 | | - $request = $request->withHeader($header, $value); |
160 | | - } |
161 | | - |
162 | 158 | $token = $this->parseTokenResponse($this->http->sendRequest($request)); |
163 | 159 | // store the instance the token belongs to |
164 | 160 | $token->extraParams = array_merge($token->extraParams, ['instance' => $this->instance]); |
|
0 commit comments