Remove unused AUTH_SPEC_LOGOUT_TOKEN_KEY and AUTH_SPEC_LOGOUT_CUSTOM_MSG_KEY

This commit is contained in:
the-djmaze 2023-01-31 12:47:57 +01:00
parent 7578d18cab
commit 9f5c75d9db
2 changed files with 0 additions and 33 deletions

View file

@ -36,9 +36,6 @@ class Actions
*/
const AUTH_ADDITIONAL_TOKEN_KEY = 'smadditional';
const AUTH_SPEC_LOGOUT_TOKEN_KEY = 'smspeclogout';
const AUTH_SPEC_LOGOUT_CUSTOM_MSG_KEY = 'smspeclogoutcmk';
const APP_DUMMY = '********';
/**
@ -846,8 +843,6 @@ class Actions
}
$aResult['SignMe'] = (string) $oConfig->Get('login', 'sign_me_auto', Enumerations\SignMeType::DEFAULT_OFF);
$aResult['AdditionalLoginError'] = $this->GetSpecLogoutCustomMgsWithDeletion();
}
}

View file

@ -234,13 +234,6 @@ trait UserAuth
{
if (false === $this->oMainAuthAccount) try {
$this->oMainAuthAccount = null;
if (isset($_COOKIE[self::AUTH_SPEC_LOGOUT_TOKEN_KEY])) {
Cookies::clear(self::AUTH_SPEC_LOGOUT_TOKEN_KEY);
Cookies::clear(self::AUTH_SIGN_ME_TOKEN_KEY);
// Cookies::clear(self::AUTH_SPEC_TOKEN_KEY);
// Cookies::clear(self::AUTH_ADDITIONAL_TOKEN_KEY);
Cookies::clear(Utils::SESSION_TOKEN);
}
$aData = Cookies::getSecure(self::AUTH_SPEC_TOKEN_KEY);
if ($aData) {
@ -413,27 +406,6 @@ trait UserAuth
* Logout methods
*/
public function SetAuthLogoutToken(): void
{
\header('X-RainLoop-Action: Logout');
Cookies::set(self::AUTH_SPEC_LOGOUT_TOKEN_KEY, \md5($_SERVER['REQUEST_TIME_FLOAT']));
}
public function GetSpecLogoutCustomMgsWithDeletion(): string
{
$sResult = Cookies::get(self::AUTH_SPEC_LOGOUT_CUSTOM_MSG_KEY) ?: '';
if (\strlen($sResult)) {
Cookies::clear(self::AUTH_SPEC_LOGOUT_CUSTOM_MSG_KEY);
}
return $sResult;
}
public function SetSpecLogoutCustomMgsWithDeletion(string $sMessage): void
{
Cookies::set(self::AUTH_SPEC_LOGOUT_CUSTOM_MSG_KEY, $sMessage);
}
public function Logout(bool $bMain) : void
{
// Cookies::clear(Utils::SESSION_TOKEN);