Session Export

Discuss general development subjects that are not specific to a particular version like the versioning control system we use or other infrastructure.
Post Reply
kwinsor5
Registered User
Posts: 2
Joined: Sat Feb 04, 2017 1:34 pm

Session Export

Post by kwinsor5 »

Hey phpBB community! I have a small potential project that requires hooking into the phpBB session so users don't have to log in twice (and more importantly so the authentication is off my hands). My main IT contact for the project mentioned phpBB offers a "session export" functionality so something like a .NET web application can take control of a token. I'm not seeing anything like this in the documentation/wiki, so can anyone confirm that this functionality exists? If it doesn't, it looks like I may have to learn some PHP unless anyone more familiar with phpBB can think of a solution that I am not :)

-Kenny

Senky
Extension Customisations
Extension Customisations
Posts: 315
Joined: Thu Jul 16, 2009 4:41 pm

Re: Session Export

Post by Senky »

You can read user cookie and compare to database sessions table.

kwinsor5
Registered User
Posts: 2
Joined: Sat Feb 04, 2017 1:34 pm

Re: Session Export

Post by kwinsor5 »

Which database are you referring to? From the information I've gotten from our client, the server that hosts the MySQL database for the existing website does not allow any external connections. I suppose the information contained in the cookie could be enough to work off of though...

Senky
Extension Customisations
Extension Customisations
Posts: 315
Joined: Thu Jul 16, 2009 4:41 pm

Re: Session Export

Post by Senky »

Cookie contents is just random string. You need to match this string to sessions table of phpBB's database to fetch user data and eventually log him in or whatever you are trying to achieve.

User avatar
3Di
Registered User
Posts: 951
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Contact:

Re: Session Export

Post by 3Di »

I think Senky is speaking about the cookie "phpbb3_blah_sid" wich contains the session id of the user, to be compared to the user "session_id" of the SESSIONS_TABLE.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

Post Reply