mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Added JWT example
This commit is contained in:
@@ -74,6 +74,10 @@ class OpenAPI3 extends Format
|
||||
if (isset($output['components']['securitySchemes']['Key'])) {
|
||||
$output['components']['securitySchemes']['Key']['x-appwrite'] = ['demo' => '919c2d18fb5d4...a2ae413da83346ad2'];
|
||||
}
|
||||
|
||||
if (isset($output['securityDefinitions']['JWT'])) {
|
||||
$output['securityDefinitions']['JWT']['x-appwrite'] = ['demo' => 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...'];
|
||||
}
|
||||
|
||||
if (isset($output['components']['securitySchemes']['Locale'])) {
|
||||
$output['components']['securitySchemes']['Locale']['x-appwrite'] = ['demo' => 'en'];
|
||||
@@ -171,7 +175,7 @@ class OpenAPI3 extends Format
|
||||
$securities[$security] = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$temp['x-appwrite']['auth'] = array_slice($securities, 0, 2);
|
||||
$temp['security'][] = $securities;
|
||||
}
|
||||
|
||||
@@ -73,6 +73,10 @@ class Swagger2 extends Format
|
||||
$output['securityDefinitions']['Key']['x-appwrite'] = ['demo' => '919c2d18fb5d4...a2ae413da83346ad2'];
|
||||
}
|
||||
|
||||
if (isset($output['securityDefinitions']['JWT'])) {
|
||||
$output['securityDefinitions']['JWT']['x-appwrite'] = ['demo' => 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...'];
|
||||
}
|
||||
|
||||
if (isset($output['securityDefinitions']['Locale'])) {
|
||||
$output['securityDefinitions']['Locale']['x-appwrite'] = ['demo' => 'en'];
|
||||
}
|
||||
@@ -169,7 +173,7 @@ class Swagger2 extends Format
|
||||
$securities[$security] = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$temp['x-appwrite']['auth'] = array_slice($securities, 0, 2);
|
||||
$temp['security'][] = $securities;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user