mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 10:56:46 -04:00
Create cookie-based login and authentication system
This commit is contained in:
parent
45221365b5
commit
0bc3dc3830
46 changed files with 528 additions and 195 deletions
|
@ -1,7 +0,0 @@
|
|||
CREATE TABLE `ApiKeys` (
|
||||
`UserId` int(10) unsigned NOT NULL,
|
||||
`Created` datetime NOT NULL,
|
||||
`Ended` datetime DEFAULT NULL,
|
||||
`Notes` text DEFAULT NULL,
|
||||
KEY `idxUserId` (`UserId`,`Ended`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
8
config/sql/se/Benefits.sql
Normal file
8
config/sql/se/Benefits.sql
Normal file
|
@ -0,0 +1,8 @@
|
|||
CREATE TABLE `Benefits` (
|
||||
`UserId` int(10) unsigned NOT NULL,
|
||||
`CanAccessFeeds` tinyint(1) unsigned NOT NULL,
|
||||
`CanVote` tinyint(1) unsigned NOT NULL,
|
||||
`CanBulkDownload` tinyint(1) unsigned NOT NULL,
|
||||
PRIMARY KEY (`UserId`),
|
||||
KEY `idxBenefits` (`CanAccessFeeds`,`CanVote`,`CanBulkDownload`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
7
config/sql/se/Sessions.sql
Normal file
7
config/sql/se/Sessions.sql
Normal file
|
@ -0,0 +1,7 @@
|
|||
CREATE TABLE `Sessions` (
|
||||
`UserId` int(10) unsigned NOT NULL,
|
||||
`Created` datetime NOT NULL,
|
||||
`SessionId` char(36) NOT NULL,
|
||||
KEY `idxUserId` (`UserId`),
|
||||
KEY `idxSessionId` (`SessionId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
Loading…
Add table
Add a link
Reference in a new issue