Core/Auth: Implement time-based token for user login as described in RFC 6238.
New column in account table is a base32 of token key bytes, coincidentally it is the same format Google's Authenticator Android app uses. If you want that to work, set system time on server correctly and use ntpd. Closes #10527 Signed-off-by: Nay <dnpd.dd@gmail.com>
This commit is contained in:
1 parent
e96aa444b0
commit
ba22baebbd
10 files changed
+160
-2
No files matched your search
@@ -29,6 +29,7 @@ CREATE TABLE `account` (
|
||||
`sessionkey` varchar(80) NOT NULL DEFAULT '',
|
||||
`v` varchar(64) NOT NULL DEFAULT '',
|
||||
`s` varchar(64) NOT NULL DEFAULT '',
|
||||
`token_key` varchar(100) NOT NULL DEFAULT '',
|
||||
`email` varchar(254) NOT NULL DEFAULT '',
|
||||
`joindate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`last_ip` varchar(15) NOT NULL DEFAULT '127.0.0.1',
|
||||
|
||||
Reference in new issue
Block a user