How would I connect an external user database to Contentbox?
Would it be possible just to use an external user table (separate data source), but store the roles in Contentbox?
How would I connect an external user database to Contentbox?
Would it be possible just to use an external user table (separate data source), but store the roles in Contentbox?
Hmm, I don’t think so. Will this be just for authentication into the system?
Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano
Yes
For this, then you will need a few things:
/**
*/
boolean function userValidator(required struct rule,any messagebox,any controller);
/**
*/
Author function getAuthorSession();
/**
*/
ISecurityService function setAuthorSession(required Author author);
/**
*/
ISecurityService function logout();
/**
*/
boolean function authenticate(required username, required password);
/**
*/
ISecurityService function sendPasswordReminder(required Author author);
/**
*/
boolean function authorizeContent(required content,required password);
/**
*/
boolean function isContentViewable(required content);
// ContentBox security
{class=“coldbox.system.interceptors.Security”,
name=“security@cb”,
properties={
rulesSource = “model”,
rulesModel = “securityRuleService@cb”,
rulesModelMethod = “getSecurityRules”,
validatorModel = “securityService@cb”}
},
The validator model property is the one you change. Once you do this, then basically authentication will be in your hands. Now, for compatibility purposes, I suggest that you map this to some local ContentBox users so the permissions systems work as well. This can be done by your Security service on the getAuthorSession() which should return the appropriate ContentBox Author object.
Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com