mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Add more oauth endpoints
This commit is contained in:
Executable
+75
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="/Users/matejbaco/Documents/GitHub/appwrite"
|
||||
ENDPOINT_DIR="$ROOT/src/Appwrite/Platform/Modules/Project/Http/Project/OAuth2"
|
||||
CONFIG_FILE="$ROOT/app/config/oAuthProviders.php"
|
||||
|
||||
if ! command -v php >/dev/null 2>&1; then
|
||||
echo "php is required but was not found in PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -d "$ENDPOINT_DIR" ]]; then
|
||||
echo "Endpoint directory not found: $ENDPOINT_DIR" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "$CONFIG_FILE" ]]; then
|
||||
echo "Config file not found: $CONFIG_FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "OAuth2 endpoint files:"
|
||||
find "$ENDPOINT_DIR" -type f | sort
|
||||
echo
|
||||
|
||||
tmp_dir="$(mktemp -d)"
|
||||
trap 'rm -rf "$tmp_dir"' EXIT
|
||||
|
||||
endpoint_file="$tmp_dir/endpoint-providers.txt"
|
||||
config_file="$tmp_dir/config-providers.txt"
|
||||
|
||||
find "$ENDPOINT_DIR" -mindepth 2 -maxdepth 2 -type f -name 'Update.php' \
|
||||
| while read -r file; do
|
||||
basename "$(dirname "$file")" | tr '[:upper:]' '[:lower:]'
|
||||
done \
|
||||
| sort -u > "$endpoint_file"
|
||||
|
||||
php -r '
|
||||
$providers = require $argv[1];
|
||||
$names = [];
|
||||
|
||||
foreach ($providers as $provider) {
|
||||
if (($provider["mock"] ?? false) === true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$class = $provider["class"] ?? "";
|
||||
if ($class === "") {
|
||||
continue;
|
||||
}
|
||||
|
||||
$base = substr($class, strrpos($class, "\\") + 1);
|
||||
$names[strtolower($base)] = true;
|
||||
}
|
||||
|
||||
$names = array_keys($names);
|
||||
sort($names);
|
||||
|
||||
foreach ($names as $name) {
|
||||
echo $name, PHP_EOL;
|
||||
}
|
||||
' "$CONFIG_FILE" > "$config_file"
|
||||
|
||||
echo "Configured provider classes:"
|
||||
cat "$config_file"
|
||||
echo
|
||||
|
||||
echo "Endpoint provider directories:"
|
||||
cat "$endpoint_file"
|
||||
echo
|
||||
|
||||
echo "Configured providers without endpoint:"
|
||||
comm -23 "$config_file" "$endpoint_file"
|
||||
@@ -105,16 +105,34 @@ use Appwrite\Utopia\Response\Model\MigrationReport;
|
||||
use Appwrite\Utopia\Response\Model\Mock;
|
||||
use Appwrite\Utopia\Response\Model\MockNumber;
|
||||
use Appwrite\Utopia\Response\Model\None;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Amazon;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Autodesk;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Bitbucket;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Bitly;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Box;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Dailymotion;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Discord;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Disqus;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Dropbox;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Etsy;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Facebook;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Figma;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2GitHub;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Google;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Linkedin;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Notion;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Podio;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Salesforce;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Slack;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Spotify;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Stripe;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Twitch;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2WordPress;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2X;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Yahoo;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Yandex;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Zoho;
|
||||
use Appwrite\Utopia\Response\Model\OAuth2Zoom;
|
||||
use Appwrite\Utopia\Response\Model\Phone;
|
||||
use Appwrite\Utopia\Response\Model\PlatformAndroid;
|
||||
use Appwrite\Utopia\Response\Model\PlatformApple;
|
||||
@@ -370,6 +388,24 @@ Response::setModel(new OAuth2Bitly());
|
||||
Response::setModel(new OAuth2Box());
|
||||
Response::setModel(new OAuth2Autodesk());
|
||||
Response::setModel(new OAuth2Google());
|
||||
Response::setModel(new OAuth2Zoom());
|
||||
Response::setModel(new OAuth2Zoho());
|
||||
Response::setModel(new OAuth2Yandex());
|
||||
Response::setModel(new OAuth2X());
|
||||
Response::setModel(new OAuth2WordPress());
|
||||
Response::setModel(new OAuth2Twitch());
|
||||
Response::setModel(new OAuth2Stripe());
|
||||
Response::setModel(new OAuth2Spotify());
|
||||
Response::setModel(new OAuth2Slack());
|
||||
Response::setModel(new OAuth2Podio());
|
||||
Response::setModel(new OAuth2Notion());
|
||||
Response::setModel(new OAuth2Salesforce());
|
||||
Response::setModel(new OAuth2Yahoo());
|
||||
Response::setModel(new OAuth2Linkedin());
|
||||
Response::setModel(new OAuth2Disqus());
|
||||
Response::setModel(new OAuth2Amazon());
|
||||
Response::setModel(new OAuth2Etsy());
|
||||
Response::setModel(new OAuth2Facebook());
|
||||
Response::setModel(new PolicyPasswordDictionary());
|
||||
Response::setModel(new PolicyPasswordHistory());
|
||||
Response::setModel(new PolicyPasswordPersonalData());
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Auth\OAuth2;
|
||||
use Utopia\Fetch\Client as FetchClient;
|
||||
|
||||
use Appwrite\Auth\OAuth2;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Auth\OAuth2;
|
||||
use Utopia\Fetch\Client as FetchClient;
|
||||
|
||||
use Appwrite\Auth\OAuth2;
|
||||
use Utopia\Fetch\Client as FetchClient;
|
||||
|
||||
class Github extends OAuth2
|
||||
{
|
||||
@@ -220,11 +220,12 @@ class Github extends OAuth2
|
||||
$repository = \json_decode($repository, true);
|
||||
return $repository;
|
||||
}
|
||||
|
||||
public function verifyCredentials(): void {
|
||||
|
||||
public function verifyCredentials(): void
|
||||
{
|
||||
$client = new FetchClient();
|
||||
$client->addHeader('Accept', 'application/json');
|
||||
|
||||
|
||||
$response = $client->fetch(
|
||||
url: 'https://github.com/login/oauth/access_token',
|
||||
method: FetchClient::METHOD_POST,
|
||||
@@ -233,19 +234,19 @@ class Github extends OAuth2
|
||||
'client_secret' => $this->appSecret,
|
||||
'code' => 'intentionally-invalid-code',
|
||||
'redirect_uri' => 'intentionally-invalid-redirect',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$json = \json_decode($response->getBody(), true);
|
||||
|
||||
|
||||
if (isset($json['error']) && $json['error'] === "Not Found") {
|
||||
throw new \Exception('GitHub application with provided Client ID is does not exist.');
|
||||
}
|
||||
|
||||
|
||||
if (isset($json['error']) && $json['error'] === "incorrect_client_credentials") {
|
||||
throw new \Exception('GitHub application with provided Client ID is valid, but the provided Client Secret is incorrect.');
|
||||
}
|
||||
|
||||
|
||||
// We still expect error, like redirect_uri_mismatch or bad_verification_code,
|
||||
// but that indicates valid credentials
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Amazon;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Amazon;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'amazon';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Amazon::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Amazon';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_AMAZON;
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Client ID of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Client Secret of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55';
|
||||
}
|
||||
}
|
||||
@@ -140,7 +140,7 @@ abstract class Base extends Action
|
||||
Authorization $authorization
|
||||
): void {
|
||||
$providerId = static::getProviderId();
|
||||
if(!(\in_array($providerId, \array_keys(Config::getParam('oAuthProviders'))))) {
|
||||
if (!(\in_array($providerId, \array_keys(Config::getParam('oAuthProviders'))))) {
|
||||
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Provider ' . $providerId . ' is not supported by server configuration.');
|
||||
}
|
||||
|
||||
@@ -162,9 +162,9 @@ abstract class Base extends Action
|
||||
$oAuthProviders[$enabledKey] = $enabled;
|
||||
}
|
||||
|
||||
if($enabled === true || \is_null($enabled)) {
|
||||
if ($enabled === true || \is_null($enabled)) {
|
||||
try {
|
||||
if(empty($oAuthProviders[$appIdKey]) || empty($oAuthProviders[$appSecretKey])) {
|
||||
if (empty($oAuthProviders[$appIdKey]) || empty($oAuthProviders[$appSecretKey])) {
|
||||
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Client ID and Client Secret are required when enabling OAuth2 provider.');
|
||||
}
|
||||
|
||||
@@ -172,13 +172,13 @@ abstract class Base extends Action
|
||||
$providerInstance = new $providerClass(appId: $oAuthProviders[$appIdKey], appSecret: $oAuthProviders[$appSecretKey], callback: '', state: [], scopes: []);
|
||||
|
||||
// E2E integration check
|
||||
if(\method_exists($providerInstance,'verifyCredentials')) {
|
||||
if (\method_exists($providerInstance, 'verifyCredentials')) {
|
||||
$providerInstance->verifyCredentials();
|
||||
}
|
||||
|
||||
$oAuthProviders[$enabledKey] = true;
|
||||
} catch(\Throwable $err) {
|
||||
if($enabled === true) {
|
||||
} catch (\Throwable $err) {
|
||||
if ($enabled === true) {
|
||||
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Could not enable OAuth2 provider: ' . $err->getMessage());
|
||||
}
|
||||
}
|
||||
@@ -188,7 +188,7 @@ abstract class Base extends Action
|
||||
'oAuthProviders' => $oAuthProviders
|
||||
]);
|
||||
|
||||
$project = $authorization->skip(fn() => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
|
||||
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
|
||||
|
||||
$response->dynamic(new Document([
|
||||
'$id' => $providerId,
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Disqus;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Disqus;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'disqus';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Disqus::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Disqus';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_DISQUS;
|
||||
}
|
||||
|
||||
public static function getClientIdParamName(): string
|
||||
{
|
||||
return 'publicKey';
|
||||
}
|
||||
|
||||
public static function getClientSecretParamName(): string
|
||||
{
|
||||
return 'secretKey';
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Public key, also known as API Key, of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Secret Key, also known as API Secret, of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Etsy;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Etsy;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'etsy';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Etsy::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Etsy';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_ETSY;
|
||||
}
|
||||
|
||||
public static function getClientIdParamName(): string
|
||||
{
|
||||
return 'keyString';
|
||||
}
|
||||
|
||||
public static function getClientSecretParamName(): string
|
||||
{
|
||||
return 'sharedSecret';
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Keystring of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Shared Secret of Etsy OAuth2 app. For example: tp000000ru';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Facebook;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Facebook;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'facebook';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Facebook::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Facebook';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_FACEBOOK;
|
||||
}
|
||||
|
||||
public static function getClientIdParamName(): string
|
||||
{
|
||||
return 'appId';
|
||||
}
|
||||
|
||||
public static function getClientSecretParamName(): string
|
||||
{
|
||||
return 'appSecret';
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'App ID of Facebook OAuth2 app. For example: 260600000007694';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'App secret of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Linkedin;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Linkedin;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'linkedin';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Linkedin::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Linkedin';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_LINKEDIN;
|
||||
}
|
||||
|
||||
public static function getClientSecretParamName(): string
|
||||
{
|
||||
return 'primaryClientSecret';
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Client ID of LinkedIn OAuth2 app. For example: 770000000000dv';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Primary Client Secret, also known as Secondary Client Secret, of LinkedIn OAuth2 app. For example: WPL_AP1.2Bf0000000000000';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Notion;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Notion;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'notion';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Notion::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Notion';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_NOTION;
|
||||
}
|
||||
|
||||
public static function getClientIdParamName(): string
|
||||
{
|
||||
return 'oauthClientId';
|
||||
}
|
||||
|
||||
public static function getClientSecretParamName(): string
|
||||
{
|
||||
return 'oauthClientSecret';
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'OAuth Client ID of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'OAuth Client Secret of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Podio;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Podio;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'podio';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Podio::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Podio';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_PODIO;
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Client ID of Podio OAuth2 app. For example: appwrite-oauth-test-app';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Client Secret of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Salesforce;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Salesforce;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'salesforce';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Salesforce::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Salesforce';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_SALESFORCE;
|
||||
}
|
||||
|
||||
public static function getClientIdParamName(): string
|
||||
{
|
||||
return 'customerKey';
|
||||
}
|
||||
|
||||
public static function getClientSecretParamName(): string
|
||||
{
|
||||
return 'customerSecret';
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Consumer key of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Consumer secret of Salesforce OAuth2 app. For example: 3w000000000000e2';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Slack;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Slack;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'slack';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Slack::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Slack';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_SLACK;
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Client ID of Slack OAuth2 app. For example: 23000000089.15000000000023';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Client Secret of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Spotify;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Spotify;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'spotify';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Spotify::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Spotify';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_SPOTIFY;
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Client ID of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Client secret of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Stripe;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Stripe;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'stripe';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Stripe::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Stripe';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_STRIPE;
|
||||
}
|
||||
|
||||
public static function getClientSecretParamName(): string
|
||||
{
|
||||
return 'apiSecretKey';
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'client ID of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'API Secret key of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Twitch;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Twitch;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'twitch';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Twitch::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Twitch';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_TWITCH;
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Client ID of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Client Secret of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\WordPress;
|
||||
|
||||
use Appwrite\Auth\OAuth2\WordPress;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'wordpress';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return WordPress::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'WordPress';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_WORDPRESS;
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Client ID of WordPress OAuth2 app. For example: 130005';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Client Secret of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\X;
|
||||
|
||||
use Appwrite\Auth\OAuth2\X;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'x';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return X::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'X';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_X;
|
||||
}
|
||||
|
||||
public static function getClientIdParamName(): string
|
||||
{
|
||||
return 'customerKey';
|
||||
}
|
||||
|
||||
public static function getClientSecretParamName(): string
|
||||
{
|
||||
return 'secretKey';
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Customer Key of X OAuth2 app. For example: slzZV0000000000000NFLaWT';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Secret Key of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Yahoo;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Yahoo;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'yahoo';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Yahoo::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Yahoo';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_YAHOO;
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Client ID, also known as Customer Key, of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Client Secret, also known as Customer Secret, of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Yandex;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Yandex;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'yandex';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Yandex::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Yandex';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_YANDEX;
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'ClientID of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Client secret of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Zoho;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Zoho;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'zoho';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Zoho::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Zoho';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_ZOHO;
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Client ID of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Client Secret of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Zoom;
|
||||
|
||||
use Appwrite\Auth\OAuth2\Zoom;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Base;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class Update extends Base
|
||||
{
|
||||
public static function getProviderId(): string
|
||||
{
|
||||
return 'zoom';
|
||||
}
|
||||
|
||||
public static function getProviderClass(): string
|
||||
{
|
||||
return Zoom::class;
|
||||
}
|
||||
|
||||
public static function getProviderLabel(): string
|
||||
{
|
||||
return 'Zoom';
|
||||
}
|
||||
|
||||
public static function getResponseModel(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_ZOOM;
|
||||
}
|
||||
|
||||
public static function getClientIdDescription(): string
|
||||
{
|
||||
return 'Client ID of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ';
|
||||
}
|
||||
|
||||
public static function getClientSecretDescription(): string
|
||||
{
|
||||
return 'Client Secret of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON';
|
||||
}
|
||||
}
|
||||
@@ -16,17 +16,35 @@ use Appwrite\Platform\Modules\Project\Http\Project\MockPhone\Delete as DeleteMoc
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\MockPhone\Get as GetMockPhone;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\MockPhone\Update as UpdateMockPhone;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\MockPhone\XList as ListMockPhones;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Amazon\Update as UpdateOAuth2Amazon;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Autodesk\Update as UpdateOAuth2Autodesk;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Bitbucket\Update as UpdateOAuth2Bitbucket;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Bitly\Update as UpdateOAuth2Bitly;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Box\Update as UpdateOAuth2Box;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Dailymotion\Update as UpdateOAuth2Dailymotion;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Discord\Update as UpdateOAuth2Discord;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Disqus\Update as UpdateOAuth2Disqus;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Dropbox\Update as UpdateOAuth2Dropbox;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Etsy\Update as UpdateOAuth2Etsy;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Facebook\Update as UpdateOAuth2Facebook;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Figma\Update as UpdateOAuth2Figma;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\Platforms\Android\Create as CreateAndroidPlatform;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\GitHub\Update as UpdateOAuth2GitHub;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Google\Update as UpdateOAuth2Google;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Linkedin\Update as UpdateOAuth2Linkedin;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Notion\Update as UpdateOAuth2Notion;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Podio\Update as UpdateOAuth2Podio;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Salesforce\Update as UpdateOAuth2Salesforce;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Slack\Update as UpdateOAuth2Slack;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Spotify\Update as UpdateOAuth2Spotify;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Stripe\Update as UpdateOAuth2Stripe;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Twitch\Update as UpdateOAuth2Twitch;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\WordPress\Update as UpdateOAuth2WordPress;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\X\Update as UpdateOAuth2X;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Yahoo\Update as UpdateOAuth2Yahoo;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Yandex\Update as UpdateOAuth2Yandex;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Zoho\Update as UpdateOAuth2Zoho;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\OAuth2\Zoom\Update as UpdateOAuth2Zoom;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\Platforms\Android\Create as CreateAndroidPlatform;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\Platforms\Android\Update as UpdateAndroidPlatform;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\Platforms\Apple\Create as CreateApplePlatform;
|
||||
use Appwrite\Platform\Modules\Project\Http\Project\Platforms\Apple\Update as UpdateApplePlatform;
|
||||
@@ -139,7 +157,7 @@ class Http extends Service
|
||||
|
||||
// Auth Methods
|
||||
$this->addAction(UpdateAuthMethod::getName(), new UpdateAuthMethod());
|
||||
|
||||
|
||||
// OAuth2
|
||||
$this->addAction(UpdateOAuth2GitHub::getName(), new UpdateOAuth2GitHub());
|
||||
$this->addAction(UpdateOAuth2Discord::getName(), new UpdateOAuth2Discord());
|
||||
@@ -151,5 +169,23 @@ class Http extends Service
|
||||
$this->addAction(UpdateOAuth2Box::getName(), new UpdateOAuth2Box());
|
||||
$this->addAction(UpdateOAuth2Autodesk::getName(), new UpdateOAuth2Autodesk());
|
||||
$this->addAction(UpdateOAuth2Google::getName(), new UpdateOAuth2Google());
|
||||
$this->addAction(UpdateOAuth2Zoom::getName(), new UpdateOAuth2Zoom());
|
||||
$this->addAction(UpdateOAuth2Zoho::getName(), new UpdateOAuth2Zoho());
|
||||
$this->addAction(UpdateOAuth2Yandex::getName(), new UpdateOAuth2Yandex());
|
||||
$this->addAction(UpdateOAuth2X::getName(), new UpdateOAuth2X());
|
||||
$this->addAction(UpdateOAuth2WordPress::getName(), new UpdateOAuth2WordPress());
|
||||
$this->addAction(UpdateOAuth2Twitch::getName(), new UpdateOAuth2Twitch());
|
||||
$this->addAction(UpdateOAuth2Stripe::getName(), new UpdateOAuth2Stripe());
|
||||
$this->addAction(UpdateOAuth2Spotify::getName(), new UpdateOAuth2Spotify());
|
||||
$this->addAction(UpdateOAuth2Slack::getName(), new UpdateOAuth2Slack());
|
||||
$this->addAction(UpdateOAuth2Podio::getName(), new UpdateOAuth2Podio());
|
||||
$this->addAction(UpdateOAuth2Notion::getName(), new UpdateOAuth2Notion());
|
||||
$this->addAction(UpdateOAuth2Salesforce::getName(), new UpdateOAuth2Salesforce());
|
||||
$this->addAction(UpdateOAuth2Yahoo::getName(), new UpdateOAuth2Yahoo());
|
||||
$this->addAction(UpdateOAuth2Linkedin::getName(), new UpdateOAuth2Linkedin());
|
||||
$this->addAction(UpdateOAuth2Disqus::getName(), new UpdateOAuth2Disqus());
|
||||
$this->addAction(UpdateOAuth2Amazon::getName(), new UpdateOAuth2Amazon());
|
||||
$this->addAction(UpdateOAuth2Etsy::getName(), new UpdateOAuth2Etsy());
|
||||
$this->addAction(UpdateOAuth2Facebook::getName(), new UpdateOAuth2Facebook());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,6 +288,24 @@ class Response extends SwooleResponse
|
||||
public const MODEL_OAUTH2_BOX = 'oAuth2Box';
|
||||
public const MODEL_OAUTH2_AUTODESK = 'oAuth2Autodesk';
|
||||
public const MODEL_OAUTH2_GOOGLE = 'oAuth2Google';
|
||||
public const MODEL_OAUTH2_ZOOM = 'oAuth2Zoom';
|
||||
public const MODEL_OAUTH2_ZOHO = 'oAuth2Zoho';
|
||||
public const MODEL_OAUTH2_YANDEX = 'oAuth2Yandex';
|
||||
public const MODEL_OAUTH2_X = 'oAuth2X';
|
||||
public const MODEL_OAUTH2_WORDPRESS = 'oAuth2WordPress';
|
||||
public const MODEL_OAUTH2_TWITCH = 'oAuth2Twitch';
|
||||
public const MODEL_OAUTH2_STRIPE = 'oAuth2Stripe';
|
||||
public const MODEL_OAUTH2_SPOTIFY = 'oAuth2Spotify';
|
||||
public const MODEL_OAUTH2_SLACK = 'oAuth2Slack';
|
||||
public const MODEL_OAUTH2_PODIO = 'oAuth2Podio';
|
||||
public const MODEL_OAUTH2_NOTION = 'oAuth2Notion';
|
||||
public const MODEL_OAUTH2_SALESFORCE = 'oAuth2Salesforce';
|
||||
public const MODEL_OAUTH2_YAHOO = 'oAuth2Yahoo';
|
||||
public const MODEL_OAUTH2_LINKEDIN = 'oAuth2Linkedin';
|
||||
public const MODEL_OAUTH2_DISQUS = 'oAuth2Disqus';
|
||||
public const MODEL_OAUTH2_AMAZON = 'oAuth2Amazon';
|
||||
public const MODEL_OAUTH2_ETSY = 'oAuth2Etsy';
|
||||
public const MODEL_OAUTH2_FACEBOOK = 'oAuth2Facebook';
|
||||
|
||||
// Health
|
||||
public const MODEL_HEALTH_STATUS = 'healthStatus';
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Amazon extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Amazon';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return 'amzn1.application-oa2-client.87400c00000000000000000000063d5b2';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return '79ffe4000000000000000000000000000000000000000000000000000002de55';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Amazon';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_AMAZON;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Disqus extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Disqus';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return 'cgegH70000000000000000000000000000000000000000000000000000Hr1nYX';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'W7Bykj00000000000000000000000000000000000000000000000000003o43w9';
|
||||
}
|
||||
|
||||
public function getClientIdFieldName(): string
|
||||
{
|
||||
return 'publicKey';
|
||||
}
|
||||
|
||||
public function getClientSecretFieldName(): string
|
||||
{
|
||||
return 'secretKey';
|
||||
}
|
||||
|
||||
public function getClientIdLabel(): string
|
||||
{
|
||||
return 'public key';
|
||||
}
|
||||
|
||||
public function getClientSecretLabel(): string
|
||||
{
|
||||
return 'secret key';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Disqus';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_DISQUS;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Etsy extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Etsy';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return 'nsgzxh0000000000008j85a2';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'tp000000ru';
|
||||
}
|
||||
|
||||
public function getClientIdFieldName(): string
|
||||
{
|
||||
return 'keyString';
|
||||
}
|
||||
|
||||
public function getClientSecretFieldName(): string
|
||||
{
|
||||
return 'sharedSecret';
|
||||
}
|
||||
|
||||
public function getClientIdLabel(): string
|
||||
{
|
||||
return 'keystring';
|
||||
}
|
||||
|
||||
public function getClientSecretLabel(): string
|
||||
{
|
||||
return 'shared secret';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Etsy';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_ETSY;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Facebook extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Facebook';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return '260600000007694';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return '2d0b2800000000000000000000d38af4';
|
||||
}
|
||||
|
||||
public function getClientIdFieldName(): string
|
||||
{
|
||||
return 'appId';
|
||||
}
|
||||
|
||||
public function getClientSecretFieldName(): string
|
||||
{
|
||||
return 'appSecret';
|
||||
}
|
||||
|
||||
public function getClientIdLabel(): string
|
||||
{
|
||||
return 'app ID';
|
||||
}
|
||||
|
||||
public function getClientSecretLabel(): string
|
||||
{
|
||||
return 'app secret';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Facebook';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_FACEBOOK;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Linkedin extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'LinkedIn';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return '770000000000dv';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'WPL_AP1.2Bf0000000000000';
|
||||
}
|
||||
|
||||
public function getClientSecretFieldName(): string
|
||||
{
|
||||
return 'primaryClientSecret';
|
||||
}
|
||||
|
||||
public function getClientSecretLabel(): string
|
||||
{
|
||||
return 'primary client secret';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Linkedin';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_LINKEDIN;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Notion extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Notion';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return '341d8700-0000-0000-0000-000000446ee3';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'secret_dLUr4b000000000000000000000000000000lFHAa9';
|
||||
}
|
||||
|
||||
public function getClientIdFieldName(): string
|
||||
{
|
||||
return 'oauthClientId';
|
||||
}
|
||||
|
||||
public function getClientSecretFieldName(): string
|
||||
{
|
||||
return 'oauthClientSecret';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Notion';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_NOTION;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Podio extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Podio';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return 'appwrite-oauth-test-app';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'Rn247T0000000000000000000000000000000000000000000000000000W2zWTN';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Podio';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_PODIO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Salesforce extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Salesforce';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return '3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return '3w000000000000e2';
|
||||
}
|
||||
|
||||
public function getClientIdFieldName(): string
|
||||
{
|
||||
return 'customerKey';
|
||||
}
|
||||
|
||||
public function getClientSecretFieldName(): string
|
||||
{
|
||||
return 'customerSecret';
|
||||
}
|
||||
|
||||
public function getClientIdLabel(): string
|
||||
{
|
||||
return 'consumer key';
|
||||
}
|
||||
|
||||
public function getClientSecretLabel(): string
|
||||
{
|
||||
return 'consumer secret';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Salesforce';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_SALESFORCE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Slack extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Slack';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return '23000000089.15000000000023';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return '81656000000000000000000000f3d2fd';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Slack';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_SLACK;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Spotify extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Spotify';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return '6ec271000000000000000000009beace';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'db068a000000000000000000008b5b9f';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Spotify';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_SPOTIFY;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Stripe extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Stripe';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return 'ca_UKibXX0000000000000000000006byvR';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp';
|
||||
}
|
||||
|
||||
public function getClientSecretFieldName(): string
|
||||
{
|
||||
return 'apiSecretKey';
|
||||
}
|
||||
|
||||
public function getClientSecretLabel(): string
|
||||
{
|
||||
return 'API secret key';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Stripe';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_STRIPE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Twitch extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Twitch';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return 'vvi0in000000000000000000ikmt9p';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'pmapue000000000000000000zylw3v';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Twitch';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_TWITCH;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2WordPress extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'WordPress';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return '130005';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2WordPress';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_WORDPRESS;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2X extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'X';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return 'slzZV0000000000000NFLaWT';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'tkEPkp00000000000000000000000000000000000000FTxbI9';
|
||||
}
|
||||
|
||||
public function getClientIdFieldName(): string
|
||||
{
|
||||
return 'customerKey';
|
||||
}
|
||||
|
||||
public function getClientSecretFieldName(): string
|
||||
{
|
||||
return 'secretKey';
|
||||
}
|
||||
|
||||
public function getClientIdLabel(): string
|
||||
{
|
||||
return 'customer key';
|
||||
}
|
||||
|
||||
public function getClientSecretLabel(): string
|
||||
{
|
||||
return 'secret key';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2X';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_X;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Yahoo extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Yahoo';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return 'dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'cf978f0000000000000000000000000000c5e2e9';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Yahoo';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_YAHOO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Yandex extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Yandex';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return '6a8a6a0000000000000000000091483c';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'bbf98500000000000000000000c75a63';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Yandex';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_YANDEX;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Zoho extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Zoho';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return '1000.83C178000000000000000000RPNX0B';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'fb5cac000000000000000000000000000000a68f6e';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Zoho';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_ZOHO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
|
||||
class OAuth2Zoom extends OAuth2Base
|
||||
{
|
||||
public function getProviderLabel(): string
|
||||
{
|
||||
return 'Zoom';
|
||||
}
|
||||
|
||||
public function getClientIdExample(): string
|
||||
{
|
||||
return 'QMAC00000000000000w0AQ';
|
||||
}
|
||||
|
||||
public function getClientSecretExample(): string
|
||||
{
|
||||
return 'GAWsG4000000000000000000007U01ON';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'OAuth2Zoom';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_OAUTH2_ZOOM;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user