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 » Sat Feb 04, 2017 1:42 pm

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: 283
Joined: Thu Jul 16, 2009 4:41 pm

Re: Session Export

Post by Senky » Sun Feb 05, 2017 12:39 pm

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 » Mon Feb 06, 2017 1:54 pm

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: 283
Joined: Thu Jul 16, 2009 4:41 pm

Re: Session Export

Post by Senky » Mon Feb 06, 2017 4:57 pm

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: 694
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano (I) Frankfurt (D)
Contact:

Re: Session Export

Post by 3Di » Mon Feb 06, 2017 10:41 pm

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.
Want to compensate me for my interest? Don't ask me, just do it
I'm available for custom phpBB jobs, you can PM me the details.
New: my Live Board, Extensions and Tools for phpBB - Men at works.

Post Reply