1
0
mirror of https://github.com/delight-im/PHP-Auth.git synced 2025-08-06 16:16:29 +02:00

Improve documentation in class 'Auth'

This commit is contained in:
Marco
2017-10-18 21:59:25 +02:00
parent 8fecb86f15
commit fa8fa4887e

View File

@@ -72,7 +72,7 @@ final class Auth extends UserManager {
// define our new cookie settings
\session_set_cookie_params($params['lifetime'], $params['path'], $params['domain'], $params['secure'], $params['httponly']);
// start the session
// start the session (requests a cookie to be written on the client)
@Session::start();
}
@@ -439,6 +439,7 @@ final class Auth extends UserManager {
$cookie->setHttpOnly($params['httponly']);
$cookie->setSecureOnly($params['secure']);
// save the instance (requests a cookie to be written on the client)
$result = $cookie->save();
if ($result === false) {
@@ -469,7 +470,7 @@ final class Auth extends UserManager {
throw new DatabaseError();
}
// re-generate the session ID to prevent session fixation attacks
// re-generate the session ID to prevent session fixation attacks (requests a cookie to be written on the client)
Session::regenerate(true);
// save the user data in the session
@@ -511,6 +512,8 @@ final class Auth extends UserManager {
}
$cookie->setHttpOnly($params['httponly']);
$cookie->setSecureOnly($params['secure']);
// delete the instance (requests a cookie to be written on the client)
$result = $cookie->delete();
if ($result === false) {