mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Merge branch 'main' into feat/queue-3
This commit is contained in:
1 file changed
+3
-2
@@ -53,7 +53,8 @@ class Create extends Action
|
||||
public function __construct()
|
||||
{
|
||||
$providers = Config::getParam('oAuthProviders', []);
|
||||
$idTokenProviders = \array_keys(\array_filter($providers, fn ($node) => !empty($node['idToken']) && empty($node['mock'])));
|
||||
$idTokenProviders = \array_keys(\array_filter($providers, fn ($node) => !empty($node['idToken'])));
|
||||
$documentedProviders = \array_filter($idTokenProviders, fn (string $provider) => empty($providers[$provider]['mock']));
|
||||
|
||||
$this
|
||||
->setHttpMethod(Action::HTTP_REQUEST_METHOD_POST)
|
||||
@@ -84,7 +85,7 @@ class Create extends Action
|
||||
->label('abuse-limit', 10)
|
||||
->label('abuse-key', 'url:{url},ip:{ip}')
|
||||
->label('abuse-reset', [201])
|
||||
->param('provider', '', new WhiteList(\array_keys($providers), true), 'OAuth2 provider that issued the ID token. Currently, supported providers are: ' . \implode(', ', $idTokenProviders) . '.', enum: new Enum(name: 'OAuthProvider', exclude: ['mock', 'mock-unverified']))
|
||||
->param('provider', '', new WhiteList($idTokenProviders, true), 'OAuth2 provider that issued the ID token. Currently, supported providers are: ' . \implode(', ', $documentedProviders) . '.', enum: new Enum(name: 'IdTokenProvider', exclude: ['mock', 'mock-unverified']))
|
||||
->param('idToken', '', new Text(8192, 0), 'OpenID Connect ID token (JWT) obtained natively from the provider, for example via Google Credential Manager or Sign in with Apple.')
|
||||
->param('nonce', '', new Text(256, 0), 'Raw nonce used when requesting the ID token. Required for Apple, and whenever the token carries a nonce claim, which must match it. Ignored when the provider issued the token without a nonce.', true)
|
||||
->param('accessToken', '', new Text(4096, 0), 'Provider access token to store alongside the session for calling provider APIs. Never used for authentication.', true)
|
||||
|
||||
Reference in new issue
Block a user