ヤミ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: SwaggerDecoratorToken.php
<?php /** * Created by PhpStorm. * User: user * Date: 30/06/2020 * Time: 18:11 */ namespace App\Swagger; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; final class SwaggerDecoratorToken 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' => [ 'access_token' => [ 'type' => 'string', 'readOnly' => true, ], 'token_type' => [ 'type' => 'string', 'readOnly' => true, ], 'refresh_token' => [ 'type' => 'string', 'readOnly' => true, ], 'scope' => [ 'type' => 'string', 'readOnly' => true, ], 'expires_in' => [ 'type' => 'integer', 'readOnly' => true, ], ], ]; //redirect-uri,grant-type $docs['components']['schemas']['Token'] = [ 'type' => 'object', 'properties' => [ 'client-id' => [ 'type' => 'string', 'example' => 'client-id', ], 'client-secret' => [ 'type' => 'string', 'example' => 'client-secret', ], 'grant-type' => [ 'type' => 'string', 'example' => 'password' ], 'username' => [ 'type' => 'string', 'example' => 'test_user', ], 'password' => [ 'type' => 'string', 'example' => '123456789', ], ], ]; $tokenDocumentation = [ 'paths' => [ '/oauth/v2/token' => [ 'post' => [ 'tags' => ['ouathToken'], 'operationId' => 'postCredentialsItem', 'summary' => 'Create new client Token.', 'requestBody' => [ 'description' => 'Create new client Token', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/Token', ], ], ], ], 'responses' => [ Response::HTTP_OK => [ 'description' => 'Create new client Token', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/Token', ], ], ], ], ], ], ], ], ]; return array_merge_recursive($docs, $tokenDocumentation); } }
Coded With 💗 by
0x6ick