Skip to content
Snippets Groups Projects
Verified Commit 3477d58c authored by Damien's avatar Damien
Browse files

FEAT #13667 TIME 0:35 Auth informations

parent b35e65ad
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,7 @@ $app->add(function (\Slim\Http\Request $request, \Slim\Http\Response $response,
});
//Authentication
$app->get('/authenticationInformations', \SrcCore\controllers\AuthenticationController::class . ':getInformations');
$app->post('/authenticate', \SrcCore\controllers\AuthenticationController::class . ':authenticate');
$app->get('/authenticate/token', \SrcCore\controllers\AuthenticationController::class . ':getRefreshedToken');
......
......@@ -18,6 +18,7 @@ use Configuration\models\ConfigurationModel;
use Email\controllers\EmailController;
use Firebase\JWT\JWT;
use History\controllers\HistoryController;
use Parameter\models\ParameterModel;
use Respect\Validation\Validator;
use Slim\Http\Request;
use Slim\Http\Response;
......@@ -31,9 +32,21 @@ class AuthenticationController
{
const MAX_DURATION_TOKEN = 30; //Minutes
const ROUTES_WITHOUT_AUTHENTICATION = [
'GET/jnlp/{jnlpUniqueId}', 'POST/password', 'PUT/password', 'GET/passwordRules', 'GET/onlyOffice/mergedFile', 'POST/onlyOfficeCallback'
'GET/authenticationInformations', 'POST/password', 'PUT/password', 'GET/passwordRules',
'GET/jnlp/{jnlpUniqueId}', 'GET/onlyOffice/mergedFile', 'POST/onlyOfficeCallback'
];
public function getInformations(Request $request, Response $response)
{
// $path = CoreConfigModel::getConfigPath();
// $hashedPath = md5($path);
$appName = CoreConfigModel::getApplicationName();
$parameter = ParameterModel::getById(['id' => 'loginpage_message', 'select' => ['param_value_string']]);
return $response->withJson(['instanceId' => null, 'applicationName' => $appName, 'loginMessage' => $parameter['param_value_string'] ?? null]);
}
public static function authentication()
{
$userId = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment