I've implemented Authentication and Authorization in Cake, and mostly it works as needed.
However, if I hit log out from a page that requires particular credentials (say /admin) and log back in as another differently privileged user, I get redirected to /admin and an error message displayed.
Looking at the request headers in chrome, I notice that the Cookie CAKEPHP is still set even after log out.
public function login() {
...
if ($this->Auth->login()) {
$this->set('login_failed', false);
return $this->redirect($this->Auth->redirect());
} else {
...
}
}
public function logout() {
return $this->redirect($this->Auth->logout());
}
Any ideas about how I can troubleshoot this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…