Skip to content

Commit f1d5536

Browse files
committed
Removed Serialization/Unserialization overhead process
1 parent 5b205e1 commit f1d5536

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/JwtSession.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function read($session_id)
139139
$jwt = new JwtWrapper($this->serverName, $this->secretKey);
140140
$data = $jwt->extractData($_COOKIE[self::COOKIE_PREFIX . $this->suffix]);
141141

142-
return $this->serializeSessionData($data->data);
142+
return $data->data;
143143
}
144144
return '';
145145
} catch (\Exception $ex) {
@@ -168,7 +168,7 @@ public function read($session_id)
168168
public function write($session_id, $session_data)
169169
{
170170
$jwt = new JwtWrapper($this->serverName, $this->secretKey);
171-
$data = $jwt->createJwtData($this->unSerializeSessionData($session_data), $this->timeOutMinutes * 60);
171+
$data = $jwt->createJwtData($session_data, $this->timeOutMinutes * 60);
172172
$token = $jwt->generateToken($data);
173173

174174
if (!headers_sent()) {
@@ -210,4 +210,4 @@ public function unSerializeSessionData($session_data)
210210

211211
return $return_data;
212212
}
213-
}
213+
}

0 commit comments

Comments
 (0)