ヤミ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: Swagger.tar
SwaggerDecorator.php 0000644 00000005244 15117752304 0010531 0 ustar 00 <?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); } } SwaggerDecoratorAuth.php 0000644 00000006077 15117752304 0011360 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); } } SwaggerDecoratorExternalService.php 0000644 00000013100 15117752304 0013543 0 ustar 00 <?php /** * Created by PhpStorm. * User: macbookpro * Date: 21/03/2021 * Time: 16:40 */ namespace App\Swagger; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; final class SwaggerDecoratorExternalService 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']['smsResponse'] = [ 'type' => 'object', 'properties' => [ 'phoneNumber' => [ 'type' => 'string', 'readOnly' => true, ], 'message' => [ 'type' => 'string', 'readOnly' => true, ], 'status' => [ 'type' => 'string', 'readOnly' => true, ], ], ]; //redirect-uri,grant-type smsParam $docs['components']['schemas']['smsParam'] = [ 'type' => 'object', 'properties' => [ 'phoneNumber' => [ 'type' => 'string', 'example' => '23769000000', ], 'message' => [ 'type' => 'string', 'example' => 'Hello', ] ], ]; $docs['components']['schemas']['sendmail'] = [ 'type' => 'object', 'properties' => [ 'email' => [ 'type' => 'string', 'example' => 'ngouaharonaldnmr@gmail.com', ], 'subject' => [ 'type' => 'string', 'example' => 'New Registration', ], 'receiver' => [ 'type' => 'string', 'example' => 'John Doe', ], 'title' => [ 'type' => 'string', 'example' => 'New Registration', ], 'attachs' => [ 'type' => 'array', 'example' => ['doc.pdf', 'doc2.png'], ], 'body' => [ 'type' => 'string', 'example' => 'Hello, your registration has been successfully completed', ], ], ]; $tokenDocumentation = [ 'paths' => [ '/external-service/sms' => [ 'post' => [ 'tags' => ['ExternalService'], 'operationId' => 'postSMSAction', 'summary' => 'Send SMS.', 'requestBody' => [ 'description' => 'Send SMS', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/smsParam', ], ], ], ], 'responses' => [ Response::HTTP_OK => [ 'description' => 'SMS send response', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/smsResponse', ], ], ], ], ], ], ], '/external-service/sendmail' => [ 'post' => [ 'tags' => ['ExternalService'], 'operationId' => 'sendEmailAction', 'summary' => 'send mail to User.', 'requestBody' => [ 'description' => 'send mail to User', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/sendmail', ], ], ], ], 'responses' => [ Response::HTTP_OK => [ 'description' => 'Mail Send Successfully', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/sendmail', ], ], ], ], ], ], ], ], ]; return array_merge_recursive($docs, $tokenDocumentation); } } SwaggerDecoratorToken.php 0000644 00000007616 15117752304 0011537 0 ustar 00 <?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); } } SwaggerDecoratorUser.php 0000644 00000012524 15117752304 0011367 0 ustar 00 <?php /** * Created by PhpStorm. * User: user * Date: 18/03/2021 * Time: 09:13 */ namespace App\Swagger; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; final class SwaggerDecoratorUser 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']['userController'] = [ 'type' => 'object', 'properties' => [ 'firstName' => [ 'type' => 'string', 'example' => 'John', ], 'lastName' => [ 'type' => 'string', 'example' => 'Doe', ], 'phoneNumber' => [ 'type' => 'string', 'example' => 'Doe', ], 'email' => [ 'type' => 'string', 'example' => 'john.doe@yahoo.com', ], 'roles' => [ 'type' => 'string', 'example' => 'ROLE_USER', ], 'username' => [ 'type' => 'string', 'example' => 'test_user', ], 'plainPassword' => [ 'type' => 'string', 'example' => '123456789', ], ], ]; $docs['components']['schemas']['resettingPass'] = [ 'type' => 'object', 'properties' => [ 'oldPassword' => [ 'type' => 'string', 'example' => '123456789', ], 'newPassword' => [ 'type' => 'string', 'example' => '123456789', ], ], ]; /* * * $builder->add('lastName') ->add('firstName') ->add('email') ->add('username') ->add('password') ->add('plainPassword') ->add('roles') */ $tokenDocumentation = [ 'paths' => [ '/register' => [ 'post' => [ 'tags' => ['userController'], 'operationId' => 'postUserAction', 'summary' => 'Register New User.', 'requestBody' => [ 'description' => 'Create new User', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/userController', ], ], ], ], 'responses' => [ Response::HTTP_OK => [ 'description' => 'Get User Info', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/userController', ], ], ], ], ], ], ], '/resetting' => [ 'put' => [ 'tags' => ['userController'], 'operationId' => 'resetPasswordAction', 'summary' => 'reset Password User.', 'requestBody' => [ 'description' => 'reset Password User', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/resettingPass', ], ], ], ], 'responses' => [ Response::HTTP_OK => [ 'description' => 'New User password ', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/resettingPass', ], ], ], ], ], ], ], ], ]; return array_merge_recursive($docs, $tokenDocumentation); } }
Coded With 💗 by
0x6ick