You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.
Hello,
Thanks for very useful libraries, currently using
Siler\Route;
Siler\Swoole;
Siler\Http\Response;
Siler\Http\Request;
With swoole 4.6.7 for a rest API and access controle via JWT (lcobucci/jwt) everything works really great and super efficient.
My question is regarding Swoole\emit ..
I assumed that swoole\emit would exit the execution then and there..
I have this code (parcial):
Route\put('/cockpit/api/{name}/{table}/{id}?/?{idname}?/', function (array $routeParams) use ($apiKey, $validate) {
// This checks against provided JWT token
$validate($routeParams['name'], 3);
$table = $routeParams['table'];
$id = $routeParams['id'];
$idname = 'id';
$update = Update::new($db);
$update->table($table);
$data = json_decode(Request\raw(), true)['data'];
//var_dump($data);
foreach($data AS $key=>$value){
$update->columns([
$key=>$value
]);
}
$update->where($idname.' =', $id);
$pdoStatement = $update->perform();
$validate($routeParams['name'], 3);
results in Swoole\emit('JWT token invalidated by constraints', 401); JWT does not pass..
if (!$jwtconf->validator()->validate($login, ...$constraints)) {
Swoole\emit('JWT token invalidated by constraints', 401);
}
returns as expected "401" JWT token invalidated by constraints
BUT the code below $validate() is still execute inspite of Swoole\emit('JWT token invalidated by constraints', 401);
The table is still updated in this case.
Is this expected behaivior.. ??
Thanks
Johan
I just want to know
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
Thanks for very useful libraries, currently using
Siler\Route;
Siler\Swoole;
Siler\Http\Response;
Siler\Http\Request;
With swoole 4.6.7 for a rest API and access controle via JWT (lcobucci/jwt) everything works really great and super efficient.
My question is regarding Swoole\emit ..
I assumed that swoole\emit would exit the execution then and there..
I have this code (parcial):
$validate($routeParams['name'], 3);
results in Swoole\emit('JWT token invalidated by constraints', 401); JWT does not pass..
returns as expected "401" JWT token invalidated by constraints
BUT the code below $validate() is still execute inspite of Swoole\emit('JWT token invalidated by constraints', 401);
The table is still updated in this case.
Is this expected behaivior.. ??
Thanks
Johan
I just want to know
The text was updated successfully, but these errors were encountered: