Velliz / pukoframework

Framework for quick PHP WEB, API and Console App development *scaffolds and generators included.
https://pukoframework.github.io
MIT License
12 stars 1 forks source link

Consitency between session expiry for Bearer, Cookies and Session #10

Closed Velliz closed 3 years ago

Velliz commented 4 years ago

Originally, expired is defined as constant variable in Auth Abstract Class

const EXPIRED_ON_CLOSE = null;
const EXPIRED_1_HOUR = 3600;
const EXPIRED_1_DAY = 86400;
const EXPIRED_1_WEEK = 604800;
const EXPIRED_1_MONTH = 2592000;

That constant used with this technique:

Session::Get(Tamu::Instance())->Login($param['username'], $param['password'], Auth::EXPIRED_1_DAY);
Cookies::Get(Tamu::Instance())->Login($param['username'], $param['password'], Auth::EXPIRED_1_DAY);
Bearer::Get(Tamu::Instance())->Login($param['username'], $param['password'], Auth::EXPIRED_1_DAY);

Later, variable expired introduced on config/encryption.php on line "expired = 30" but seems the implementation still not complete across all Auth classes.

Glossary:

Q: expired is set in 30 by default as? hour? day? minute? seconds? A: Wee will make it as minute.

Velliz commented 4 years ago

Tested on bearer -> OK