mirror of
https://github.com/friendica/friendica
synced 2024-12-23 10:00:20 +00:00
API: Fix for OAuth endpoints that mustn't be authorized
This commit is contained in:
parent
9f401a5952
commit
47e9aa6338
4 changed files with 19 additions and 0 deletions
|
@ -37,6 +37,7 @@ class Apps extends BaseApi
|
|||
{
|
||||
return parent::run($request, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
|
|
|
@ -24,12 +24,18 @@ namespace Friendica\Module\OAuth;
|
|||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\BaseApi;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Acknowledgement of OAuth requests
|
||||
*/
|
||||
class Acknowledge extends BaseApi
|
||||
{
|
||||
public function run(array $request = [], bool $scopecheck = true): ResponseInterface
|
||||
{
|
||||
return parent::run($request, false);
|
||||
}
|
||||
|
||||
protected function post(array $request = [])
|
||||
{
|
||||
DI::session()->set('oauth_acknowledge', true);
|
||||
|
|
|
@ -26,12 +26,18 @@ use Friendica\Core\System;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\BaseApi;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* @see https://docs.joinmastodon.org/spec/oauth/
|
||||
*/
|
||||
class Revoke extends BaseApi
|
||||
{
|
||||
public function run(array $request = [], bool $scopecheck = true): ResponseInterface
|
||||
{
|
||||
return parent::run($request, false);
|
||||
}
|
||||
|
||||
protected function post(array $request = [])
|
||||
{
|
||||
$request = $this->getRequest([
|
||||
|
|
|
@ -28,6 +28,7 @@ use Friendica\DI;
|
|||
use Friendica\Module\BaseApi;
|
||||
use Friendica\Security\OAuth;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* @see https://docs.joinmastodon.org/spec/oauth/
|
||||
|
@ -35,6 +36,11 @@ use Friendica\Util\DateTimeFormat;
|
|||
*/
|
||||
class Token extends BaseApi
|
||||
{
|
||||
public function run(array $request = [], bool $scopecheck = true): ResponseInterface
|
||||
{
|
||||
return parent::run($request, false);
|
||||
}
|
||||
|
||||
protected function post(array $request = [])
|
||||
{
|
||||
$request = $this->getRequest([
|
||||
|
|
Loading…
Reference in a new issue