-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* NOT working * Base server completed - No message handling from MQ * 0-ALPHA * Fixed run script * Improvements * Checking bug on apache configuration * Testable version * Stable release * Re-activated SocketListener Component * Fixed not resolved path from outside server directory * Updated submodule * Fix api token * Fixed comments delivery * Fixed test-script * Improvement on Languages class * Updates internal * Fixed broadcast logout on password change * Update yarn lock --------- Co-authored-by: riccio82 <[email protected]>
- Loading branch information
Showing
29 changed files
with
1,251 additions
and
471 deletions.
There are no files selected for viewing
Submodule docker
updated
from 1ea3d8 to 7a2552
Submodule internal_scripts
updated
from d5a4d5 to eb5ef8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: fregini | ||
* Date: 22/11/2016 | ||
* User: Domenico <[email protected]>, <[email protected]> | ||
* Date: 19/09/2024 | ||
* Time: 09:38 | ||
*/ | ||
|
||
|
@@ -132,4 +132,32 @@ public function token() { | |
$this->response->code( 200 ); | ||
} | ||
|
||
/** | ||
* Signed Double-Submit Cookie | ||
* @throws Exception | ||
*/ | ||
public function socketToken() { | ||
|
||
if ( empty( $_SESSION[ 'user' ] ) ) { | ||
$this->response->code( 406 ); | ||
return; | ||
} | ||
|
||
$jwt = new SimpleJWT( [ "uid" => $_SESSION[ 'user' ]->uid ] ); | ||
$jwt->setTimeToLive( 60 ); | ||
|
||
CookieManager::setCookie( INIT::$XSRF_TOKEN, $jwt->jsonSerialize(), | ||
[ | ||
'expires' => time() + 60, /* now + 60 seconds */ | ||
'path' => '/', | ||
'domain' => INIT::$COOKIE_DOMAIN, | ||
'secure' => true, | ||
'httponly' => false, | ||
'samesite' => 'Strict', | ||
] | ||
); | ||
|
||
$this->response->code( 200 ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.