authentication - Cross Platform Login -
i working on application user authentication happens in coldfusion application (based on cfwheels), interactions file servers happen through node.js application. need make sure user logged in on cf application allowed access files in node server. thinking of setting cookie cftoken or node server can read , pass coldfusion asking "hey can token access file"
my problem wasn't sure if cftokens re-used eventually, , if should use instead?
if other people have other ways of doing sort of thing authentication needs reusable across multiple engines love hear strategies.
that sounds fine way it.
but, use cfcookie set cookie of own devising.
the 2 servers have share domain name, of course, able read same cookie. have set cookie domain cookie.
one clean way architect create whole cfc devoted security.
it have methods generating , validating login tokens.
your cf application use generate token, , have node.js application call via webservice using the
http://server.com/path/security.cfc?method=validatetoken&token=whatever
an more efficient way this, assuming have access same datastore, use same algorithm generate/decode (if needed) tokens in both systems, , let node.js app directly access datastore.
when needed this, stored "session" tokens in mongodb, , directly accessed datastore each application (cf, java, , rails). cf system responsible initial authentication. other 2 systems did no authentication, validated token, , if not found/invalid/etc, responded in appropriate way.
Comments
Post a Comment