Preparation for Oauth client registration

This commit is contained in:
Michael 2021-05-09 22:23:21 +00:00
commit 585d283ff9
7 changed files with 199 additions and 5 deletions

View file

@ -55,7 +55,7 @@
use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
define('DB_UPDATE_VERSION', 1414);
define('DB_UPDATE_VERSION', 1415);
}
return [
@ -426,6 +426,22 @@ return [
"gsid" => ["gsid"]
]
],
"application" => [
"comment" => "OAuth application",
"fields" => [
"id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
"client_id" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
"client_secret" => ["type" => "varchar(64)", "not null" => "1", "comment" => ""],
"name" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
"redirect_uri" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
"website" => ["type" => "varchar(255)", "comment" => ""],
"scopes" => ["type" => "varchar(255)", "comment" => ""],
],
"indexes" => [
"PRIMARY" => ["id"],
"client_id" => ["UNIQUE", "client_id"]
]
],
"attach" => [
"comment" => "file attachments",
"fields" => [

View file

@ -86,7 +86,7 @@ return [
'/announcements' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not implemented
'/announcements/{id:\d+}/dismiss' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]], // not implemented
'/announcements/{id:\d+}/reactions/{name}' => [Module\Api\Mastodon\Unimplemented::class, [R::PUT, R::DELETE]], // not implemented
'/apps' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
'/apps' => [Module\Api\Mastodon\Apps::class, [ R::POST]],
'/apps/verify_credentials' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
'/blocks' => [Module\Api\Mastodon\Blocks::class, [R::GET ]],
'/bookmarks' => [Module\Api\Mastodon\Bookmarks::class, [R::GET ]],