FTW-Entertainment-LLC / AnimeFTW.tv-Site

Production AnimeFTW.tv Site
3 stars 3 forks source link

Device Authentication for the API #232

Closed robotman321 closed 8 years ago

robotman321 commented 8 years ago

The objective is to provide a 6 digit hexadecimal code when requested by allowable devices. Users will then take the code seen on their TV/Device screen and input it on the site.

Items Needed:

robotman321 commented 8 years ago

devices table:

CREATE TABLE IF NOT EXISTS `developers_devices` (
  `id` int(15) NOT NULL,
  `key` varchar(6) NOT NULL,
  `date` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `did` int(11) NOT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

developers_api_sessions column update:

ALTER TABLE `developers_api_sessions` ADD `device` INT(15) NULL DEFAULT NULL ;

developers update for device auth:

ALTER TABLE `developers` ADD `deviceauth` INT(1) NOT NULL DEFAULT '0' ;