Commit 70bc875a authored by Ghitha Dinan's avatar Ghitha Dinan

test request

parent 7ec3f7a6
<?php
/**
* Created by PhpStorm.
* User: gets
* Date: 4/4/2019
* Time: 4:40 PM
*/
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use GuzzleHttp\Client;
class BaseController extends Controller
{
protected $request;
public function __construct(Request $request)
{
$this->request = $request;
}
protected function masheryClient()
{
$client = new Client([
'base_uri' => 'https://api.mashery.com/',
'headers' => [
'Authorization' => 'Bearer ' . $this->request->auth['token'],
'Content-Type' => 'application/json'
],
'http_errors' => false
]);
return $client;
}
}
<?php
/**
* Created by PhpStorm.
* User: gets
* Date: 4/4/2019
* Time: 3:24 PM
*/
namespace App\Http\Controllers;
use App\Classes\MResponse;
use App\Http\Request\UserByUsernameRequest;
class UserController extends BaseController
{
public function getByUsername(UserByUsernameRequest $request)
{
$mResponse = new MResponse();
$statusCode = 200;
try {
$response = $this->masheryClient()->request('GET', 'https://api.mashery.com/v3/rest/members', [
'query' => [
'filter' => 'username:' . $request->get('username')
]
]);
$resBody = json_decode($response->getBody()->getContents(), true);
if ($response->getStatusCode() != 200) {
$statusCode = $response->getStatusCode();
$mResponse->message = $resBody;
} else {
$mResponse->success = true;
$mResponse->message = 'success';
$mResponse->data = $resBody;
}
} catch (\Exception $e) {
$statusCode = 500;
$mResponse->message = $e->getMessage();
}
return response()->json($mResponse, $statusCode);
}
}
<?php
/**
* Created by PhpStorm.
* User: gets
* Date: 4/4/2019
* Time: 3:14 PM
*/
namespace App\Http\Middleware;
use App\Classes\MResponse;
use Closure;
class ClientMiddleware
{
public function handle($request, Closure $next, $guard = null)
{
$token = $request->header('Authorization');
$response = new MResponse();
if (empty($token)) {
$response->message = 'Token not provided';
return response()->json($response, 401);
}
$authUser = [
'token' => $token
];
$request->auth = $authUser;
return $next($request);
}
}
<?php
/**
* Created by PhpStorm.
* User: gets
* Date: 4/4/2019
* Time: 4:00 PM
*/
namespace App\Http\Request;
use App\Classes\MResponse;
use Illuminate\Contracts\Validation\Validator;
use Pearl\RequestValidate\RequestAbstract;
class FormRequestErrors extends RequestAbstract
{
protected function validationData()
{
return $this->json()->all();
}
/**
* Format the errors from the given Validator instance.
*
* @param \Illuminate\Contracts\Validation\Validator $validator
* @return \Illuminate\Http\JsonResponse
*/
protected function formatErrors(Validator $validator)
{
$mResponse = new MResponse();
$mResponse->message = $validator->errors();
return response()->json($mResponse, 422);
}
protected function getValidatorInstance()
{
$this->getInputSource()->replace($this->modifyData());
$validator = parent::getValidatorInstance();
return $validator;
}
}
<?php
/**
* Created by PhpStorm.
* User: gets
* Date: 4/4/2019
* Time: 3:45 PM
*/
namespace App\Http\Request;
class UserByUsernameRequest extends FormRequestErrors
{
protected function validationData()
{
return $this->all();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'username' => 'required'
];
}
/**
* Get custom messages for validator errors.
*
* @return array
*/
public function messages()
{
return [];
}
protected function modifyData()
{
$data = $this->validationData();
return $data;
}
}
<?php
require_once __DIR__.'/../vendor/autoload.php';
require_once __DIR__ . '/../vendor/autoload.php';
(new Laravel\Lumen\Bootstrap\LoadEnvironmentVariables(
dirname(__DIR__)
......@@ -21,9 +21,9 @@ $app = new Laravel\Lumen\Application(
dirname(__DIR__)
);
// $app->withFacades();
//$app->withFacades();
// $app->withEloquent();
//$app->withEloquent();
/*
|--------------------------------------------------------------------------
......@@ -63,6 +63,7 @@ $app->singleton(
$app->routeMiddleware([
'auth' => App\Http\Middleware\Authenticate::class,
'client.auth' => App\Http\Middleware\ClientMiddleware::class
]);
/*
......@@ -79,6 +80,7 @@ $app->routeMiddleware([
// $app->register(App\Providers\AppServiceProvider::class);
// $app->register(App\Providers\AuthServiceProvider::class);
// $app->register(App\Providers\EventServiceProvider::class);
$app->register(Pearl\RequestValidate\RequestServiceProvider::class);
/*
|--------------------------------------------------------------------------
......@@ -94,7 +96,7 @@ $app->routeMiddleware([
$app->router->group([
'namespace' => 'App\Http\Controllers',
], function ($router) {
require __DIR__.'/../routes/web.php';
require __DIR__ . '/../routes/web.php';
});
return $app;
......@@ -8,6 +8,7 @@
"php": ">=7.1.3",
"guzzlehttp/guzzle": "~6.0",
"laravel/lumen-framework": "5.8.*",
"pearl/lumen-request-validate": "^1.2",
"vlucas/phpdotenv": "^3.3"
},
"require-dev": {
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "5f9048b7a5af8863498b66b9fc1b507b",
"content-hash": "21afb945c55a0717258763da87c1b757",
"packages": [
{
"name": "doctrine/inflector",
......@@ -423,16 +423,16 @@
},
{
"name": "illuminate/auth",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/auth.git",
"reference": "77fd77bf71154ac8dbcd5c90b756c23d15ac4bde"
"reference": "d170090b541719575dfb0b05848988c53989772d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/auth/zipball/77fd77bf71154ac8dbcd5c90b756c23d15ac4bde",
"reference": "77fd77bf71154ac8dbcd5c90b756c23d15ac4bde",
"url": "https://api.github.com/repos/illuminate/auth/zipball/d170090b541719575dfb0b05848988c53989772d",
"reference": "d170090b541719575dfb0b05848988c53989772d",
"shasum": ""
},
"require": {
......@@ -470,20 +470,20 @@
],
"description": "The Illuminate Auth package.",
"homepage": "https://laravel.com",
"time": "2019-03-26T01:29:46+00:00"
"time": "2019-04-01T00:55:30+00:00"
},
{
"name": "illuminate/broadcasting",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/broadcasting.git",
"reference": "237111ff654815f563b8ada4ce0b528192f15e8f"
"reference": "f6806fbcc33cfa930a4f0b43018b416f72dfc5c1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/broadcasting/zipball/237111ff654815f563b8ada4ce0b528192f15e8f",
"reference": "237111ff654815f563b8ada4ce0b528192f15e8f",
"url": "https://api.github.com/repos/illuminate/broadcasting/zipball/f6806fbcc33cfa930a4f0b43018b416f72dfc5c1",
"reference": "f6806fbcc33cfa930a4f0b43018b416f72dfc5c1",
"shasum": ""
},
"require": {
......@@ -521,11 +521,11 @@
],
"description": "The Illuminate Broadcasting package.",
"homepage": "https://laravel.com",
"time": "2019-02-25T13:58:21+00:00"
"time": "2019-03-27T10:17:08+00:00"
},
{
"name": "illuminate/bus",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/bus.git",
......@@ -570,16 +570,16 @@
},
{
"name": "illuminate/cache",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/cache.git",
"reference": "684bb0f3424c0dc1ff8c2cf9b3bd8429c83eab20"
"reference": "40463fe8f7f49d3f6cf6cf4aa1759fa76f29b797"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/cache/zipball/684bb0f3424c0dc1ff8c2cf9b3bd8429c83eab20",
"reference": "684bb0f3424c0dc1ff8c2cf9b3bd8429c83eab20",
"url": "https://api.github.com/repos/illuminate/cache/zipball/40463fe8f7f49d3f6cf6cf4aa1759fa76f29b797",
"reference": "40463fe8f7f49d3f6cf6cf4aa1759fa76f29b797",
"shasum": ""
},
"require": {
......@@ -615,11 +615,11 @@
],
"description": "The Illuminate Cache package.",
"homepage": "https://laravel.com",
"time": "2019-03-21T13:40:24+00:00"
"time": "2019-03-28T14:00:15+00:00"
},
{
"name": "illuminate/config",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/config.git",
......@@ -663,16 +663,16 @@
},
{
"name": "illuminate/console",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/console.git",
"reference": "898f200fc75464baa66c56ec3087daf9961c5367"
"reference": "eab3bf78c3ec1128764fea6325a47c9f77cb9f3d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/console/zipball/898f200fc75464baa66c56ec3087daf9961c5367",
"reference": "898f200fc75464baa66c56ec3087daf9961c5367",
"url": "https://api.github.com/repos/illuminate/console/zipball/eab3bf78c3ec1128764fea6325a47c9f77cb9f3d",
"reference": "eab3bf78c3ec1128764fea6325a47c9f77cb9f3d",
"shasum": ""
},
"require": {
......@@ -710,11 +710,11 @@
],
"description": "The Illuminate Console package.",
"homepage": "https://laravel.com",
"time": "2019-02-21T14:30:13+00:00"
"time": "2019-04-01T19:08:55+00:00"
},
{
"name": "illuminate/container",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/container.git",
......@@ -759,16 +759,16 @@
},
{
"name": "illuminate/contracts",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/contracts.git",
"reference": "3e3a9a654adbf798e05491a5dbf90112df1effde"
"reference": "7224ed316427ae5f67c4888679bbf7f6e7773660"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/3e3a9a654adbf798e05491a5dbf90112df1effde",
"reference": "3e3a9a654adbf798e05491a5dbf90112df1effde",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/7224ed316427ae5f67c4888679bbf7f6e7773660",
"reference": "7224ed316427ae5f67c4888679bbf7f6e7773660",
"shasum": ""
},
"require": {
......@@ -799,20 +799,20 @@
],
"description": "The Illuminate Contracts package.",
"homepage": "https://laravel.com",
"time": "2019-02-18T18:37:54+00:00"
"time": "2019-03-06T19:39:19+00:00"
},
{
"name": "illuminate/database",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/database.git",
"reference": "05a0f0b4588b6376bfc7213e1a781dd8120e7c8e"
"reference": "4d5fd9170c8e8afba599cffd20744b7d8787ac79"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/database/zipball/05a0f0b4588b6376bfc7213e1a781dd8120e7c8e",
"reference": "05a0f0b4588b6376bfc7213e1a781dd8120e7c8e",
"url": "https://api.github.com/repos/illuminate/database/zipball/4d5fd9170c8e8afba599cffd20744b7d8787ac79",
"reference": "4d5fd9170c8e8afba599cffd20744b7d8787ac79",
"shasum": ""
},
"require": {
......@@ -859,11 +859,11 @@
"orm",
"sql"
],
"time": "2019-03-26T17:13:31+00:00"
"time": "2019-04-01T05:04:37+00:00"
},
{
"name": "illuminate/encryption",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/encryption.git",
......@@ -910,7 +910,7 @@
},
{
"name": "illuminate/events",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/events.git",
......@@ -955,7 +955,7 @@
},
{
"name": "illuminate/filesystem",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/filesystem.git",
......@@ -1007,7 +1007,7 @@
},
{
"name": "illuminate/hashing",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/hashing.git",
......@@ -1051,16 +1051,16 @@
},
{
"name": "illuminate/http",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/http.git",
"reference": "16ea0dac2e34f0d37235330ebb57ea6fd3ae63cf"
"reference": "5a3f9268561a8df637904dead361ed4e6b4eaf85"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/http/zipball/16ea0dac2e34f0d37235330ebb57ea6fd3ae63cf",
"reference": "16ea0dac2e34f0d37235330ebb57ea6fd3ae63cf",
"url": "https://api.github.com/repos/illuminate/http/zipball/5a3f9268561a8df637904dead361ed4e6b4eaf85",
"reference": "5a3f9268561a8df637904dead361ed4e6b4eaf85",
"shasum": ""
},
"require": {
......@@ -1094,11 +1094,11 @@
],
"description": "The Illuminate Http package.",
"homepage": "https://laravel.com",
"time": "2019-03-25T02:53:12+00:00"
"time": "2019-03-29T18:03:35+00:00"
},
{
"name": "illuminate/log",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/log.git",
......@@ -1143,7 +1143,7 @@
},
{
"name": "illuminate/pagination",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/pagination.git",
......@@ -1188,7 +1188,7 @@
},
{
"name": "illuminate/pipeline",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/pipeline.git",
......@@ -1232,7 +1232,7 @@
},
{
"name": "illuminate/queue",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/queue.git",
......@@ -1291,7 +1291,7 @@
},
{
"name": "illuminate/session",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/session.git",
......@@ -1342,16 +1342,16 @@
},
{
"name": "illuminate/support",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/support.git",
"reference": "5bce502f0bdb97ebbda0eb4f6cb75455d5a01529"
"reference": "e275519c58246cc4011c798f9b0a0f83aae2aab7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/support/zipball/5bce502f0bdb97ebbda0eb4f6cb75455d5a01529",
"reference": "5bce502f0bdb97ebbda0eb4f6cb75455d5a01529",
"url": "https://api.github.com/repos/illuminate/support/zipball/e275519c58246cc4011c798f9b0a0f83aae2aab7",
"reference": "e275519c58246cc4011c798f9b0a0f83aae2aab7",
"shasum": ""
},
"require": {
......@@ -1399,11 +1399,11 @@
],
"description": "The Illuminate Support package.",
"homepage": "https://laravel.com",
"time": "2019-03-25T21:36:23+00:00"
"time": "2019-04-01T19:02:05+00:00"
},
{
"name": "illuminate/translation",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/translation.git",
......@@ -1449,7 +1449,7 @@
},
{
"name": "illuminate/validation",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/validation.git",
......@@ -1501,7 +1501,7 @@
},
{
"name": "illuminate/view",
"version": "v5.8.8",
"version": "v5.8.9",
"source": {
"type": "git",
"url": "https://github.com/illuminate/view.git",
......@@ -1878,6 +1878,53 @@
],
"time": "2019-02-22T10:30:00+00:00"
},
{
"name": "pearl/lumen-request-validate",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/pearlkrishn/lumen-request-validate.git",
"reference": "fc26dc4763affd691eceba6b9322a9656d5e1158"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pearlkrishn/lumen-request-validate/zipball/fc26dc4763affd691eceba6b9322a9656d5e1158",
"reference": "fc26dc4763affd691eceba6b9322a9656d5e1158",
"shasum": ""
},
"require": {
"illuminate/support": "5.7.* || 5.8.*",
"laravel/lumen-framework": "5.7.* || 5.8.*",
"php": ">=7.1.3"
},
"type": "library",
"autoload": {
"psr-4": {
"Pearl\\RequestValidate\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "pearlkrishn",
"email": "pearlkrishn@gmail.com"
}
],
"description": "Lumen doesn't have form request validator seperatly. This package helps developers to segregate the validation layer from the controller to a separate dedicated class",
"keywords": [
"form-request",
"form-request-validation",
"form-validation",
"lumen",
"lumen-package",
"lumen-request-validate",
"validation"
],
"time": "2019-03-18T07:43:27+00:00"
},
{
"name": "phpoption/phpoption",
"version": "1.5.0",
......@@ -2164,16 +2211,16 @@
},
{
"name": "symfony/console",
"version": "v4.2.4",
"version": "v4.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "9dc2299a016497f9ee620be94524e6c0af0280a9"
"reference": "24206aff3efe6962593297e57ef697ebb220e384"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/9dc2299a016497f9ee620be94524e6c0af0280a9",
"reference": "9dc2299a016497f9ee620be94524e6c0af0280a9",
"url": "https://api.github.com/repos/symfony/console/zipball/24206aff3efe6962593297e57ef697ebb220e384",
"reference": "24206aff3efe6962593297e57ef697ebb220e384",
"shasum": ""
},
"require": {
......@@ -2232,7 +2279,7 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2019-02-23T15:17:42+00:00"
"time": "2019-04-01T07:32:59+00:00"
},
{
"name": "symfony/contracts",
......@@ -2304,16 +2351,16 @@
},
{
"name": "symfony/debug",
"version": "v4.2.4",
"version": "v4.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "de73f48977b8eaf7ce22814d66e43a1662cc864f"
"reference": "43ce8ab34c734dcc8a4af576cb86711daab964c5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/de73f48977b8eaf7ce22814d66e43a1662cc864f",
"reference": "de73f48977b8eaf7ce22814d66e43a1662cc864f",
"url": "https://api.github.com/repos/symfony/debug/zipball/43ce8ab34c734dcc8a4af576cb86711daab964c5",
"reference": "43ce8ab34c734dcc8a4af576cb86711daab964c5",
"shasum": ""
},
"require": {
......@@ -2356,20 +2403,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2019-03-03T18:11:24+00:00"
"time": "2019-03-10T17:09:50+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v4.2.4",
"version": "v4.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "3354d2e6af986dd71f68b4e5cf4a933ab58697fb"
"reference": "ca5af306fbc37f3cf597e91bc9cfa0c7d3f33544"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3354d2e6af986dd71f68b4e5cf4a933ab58697fb",
"reference": "3354d2e6af986dd71f68b4e5cf4a933ab58697fb",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ca5af306fbc37f3cf597e91bc9cfa0c7d3f33544",
"reference": "ca5af306fbc37f3cf597e91bc9cfa0c7d3f33544",
"shasum": ""
},
"require": {
......@@ -2420,11 +2467,11 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2019-02-23T15:17:42+00:00"
"time": "2019-03-30T15:58:42+00:00"
},
{
"name": "symfony/finder",
"version": "v4.2.4",
"version": "v4.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
......@@ -2473,16 +2520,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v4.2.4",
"version": "v4.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "850a667d6254ccf6c61d853407b16f21c4579c77"
"reference": "5b7ab6beaa5b053b8d3c9b13367ada9b292e12e1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/850a667d6254ccf6c61d853407b16f21c4579c77",
"reference": "850a667d6254ccf6c61d853407b16f21c4579c77",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/5b7ab6beaa5b053b8d3c9b13367ada9b292e12e1",
"reference": "5b7ab6beaa5b053b8d3c9b13367ada9b292e12e1",
"shasum": ""
},
"require": {
......@@ -2523,20 +2570,20 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
"time": "2019-02-26T08:03:39+00:00"
"time": "2019-03-30T15:58:42+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v4.2.4",
"version": "v4.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "895ceccaa8149f9343e6134e607c21da42d73b7a"
"reference": "e8b940bbeebf0f96789b5d17d9d77f8b2613960b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/895ceccaa8149f9343e6134e607c21da42d73b7a",
"reference": "895ceccaa8149f9343e6134e607c21da42d73b7a",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/e8b940bbeebf0f96789b5d17d9d77f8b2613960b",
"reference": "e8b940bbeebf0f96789b5d17d9d77f8b2613960b",
"shasum": ""
},
"require": {
......@@ -2612,7 +2659,7 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
"time": "2019-03-03T19:38:09+00:00"
"time": "2019-04-02T19:03:51+00:00"
},
{
"name": "symfony/polyfill-ctype",
......@@ -2788,16 +2835,16 @@
},
{
"name": "symfony/process",
"version": "v4.2.4",
"version": "v4.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "6c05edb11fbeff9e2b324b4270ecb17911a8b7ad"
"reference": "1e6cbb41dadcaf29e0db034d6ad0d039a9df06e6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/6c05edb11fbeff9e2b324b4270ecb17911a8b7ad",
"reference": "6c05edb11fbeff9e2b324b4270ecb17911a8b7ad",
"url": "https://api.github.com/repos/symfony/process/zipball/1e6cbb41dadcaf29e0db034d6ad0d039a9df06e6",
"reference": "1e6cbb41dadcaf29e0db034d6ad0d039a9df06e6",
"shasum": ""
},
"require": {
......@@ -2833,20 +2880,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2019-01-24T22:05:03+00:00"
"time": "2019-03-10T20:07:02+00:00"
},
{
"name": "symfony/translation",
"version": "v4.2.4",
"version": "v4.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "748464177a77011f8f4cdd076773862ce4915f8f"
"reference": "e46933cc31b68f51f7fc5470fb55550407520f56"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/748464177a77011f8f4cdd076773862ce4915f8f",
"reference": "748464177a77011f8f4cdd076773862ce4915f8f",
"url": "https://api.github.com/repos/symfony/translation/zipball/e46933cc31b68f51f7fc5470fb55550407520f56",
"reference": "e46933cc31b68f51f7fc5470fb55550407520f56",
"shasum": ""
},
"require": {
......@@ -2906,11 +2953,11 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
"time": "2019-02-27T03:31:50+00:00"
"time": "2019-04-01T14:13:08+00:00"
},
{
"name": "symfony/var-dumper",
"version": "v4.2.4",
"version": "v4.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
......@@ -4526,16 +4573,16 @@
},
{
"name": "theseer/tokenizer",
"version": "1.1.0",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
"reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
"reference": "06b6ce404ee574e9c1787fb67bb9980ca4387c34"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
"reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/06b6ce404ee574e9c1787fb67bb9980ca4387c34",
"reference": "06b6ce404ee574e9c1787fb67bb9980ca4387c34",
"shasum": ""
},
"require": {
......@@ -4562,7 +4609,7 @@
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"time": "2017-04-07T12:08:54+00:00"
"time": "2019-04-03T18:37:40+00:00"
},
{
"name": "webmozart/assert",
......
......@@ -22,3 +22,9 @@ $router->get('/getUser', 'MasheryGetUserController@getUser');
$router->group(['prefix' => 'mashery'], function () use ($router) {
$router->get('token', 'MasheryController@getToken');
});
$router->group(['middleware' => 'client.auth'], function () use ($router) {
$router->group(['prefix' => 'user'], function () use ($router) {
$router->get('by-username', 'UserController@getByUsername');
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment