问题
Ok, so on the coldfusion site I'm working on I just installed a third party (open source) CF forum known as "Galleon".
I asked a similar question a bit ago but now we have progressed a bit.
The issue at hand is that it will not recognize -any- variables (sessions, etc) that exist of the parent site proper. The forum itself is stored inside of a sub folder within the site directory.. But when we try to output session variables, which we know have not expired or whatnot, it spits out an error and doesn't recognize them.
I scanned for anything that clears variables (like structclear(session), etc) and didn't turn up much.. Is there some kind of setting in application.cfm I should be aware of?
In general how do you get cross application authentication going on CF?
What we want to do is populate a new session variable based off of the existing session.userid variable that is created when the user logs onto the main site. We want this so we can bypass having to ask them to login in AGAIN into the Galleon forum (and all the complications this causes).
回答1:
It's very possible that in the forum's Application.cfc, you'll need to extend the root Application.cfc. Then you'll update the forum's onApplicationStart() to call super.onApplicationStart()
before anything else. The same may be true for each Application.cfc function, depending on what's going on in the parent Application.cfc.
Galleon's Application.cfc would no longer need the application name and other variables setup in the parent Application.cfc (like @Ben noted).
回答2:
Make sure your Application name is the same in both application.cfms/application.cfc between the two applications otherwise they won't share the same session/application data.
And do a quick scan for possible variable conflicts between the applications like "session.user" etc.
来源:https://stackoverflow.com/questions/12044028/coldfusion-cross-site-authentication