I have a database with the following tables:
CREATE TABLE `visitors` (
`name` varchar(64) not null,
`id` int(10) unsigned not null auto_increment,
# ...more fields here
PRIMARY KEY (`id`),
UNIQUE KEY (`name`)
);
CREATE TABLE `credentials` (
`id` int(10) unsigned not null auto_increment,
`visitor_id` int(10) unsigned,
`type` enum('password','openid','google','facebook') not null,
`token` char(40) not null,
`modified` datetime,
`hint` varchar(64),
PRIMARY KEY (`id`),
KEY `visitor` (`visitor_id`),
KEY `token` (`token`)
);
After thinking about this for a awhile, I've decided that this is "right" for e.g. normalization and allowing visitors to have multiple login credentials, including multiple passwords.
However, I'd like to use Cake's ACL features, and AuthComponent assumes that hashed passwords are stored in the same table as user (visitor) information. What's the best way to work around this? Do I have to use Auth->login(), or is there a better way?