3đź‘Ť
âś…
If you can unpickle in PHP what Django pickled into the session, then you can just grab the relevant session data directly form database (using session id from cookie), and then you’ll have a direct info which user is logged in Django site – if any.
EDIT:
Here’s the “encryption” Django uses:
After “decrypting” you should get something like:
{
'_auth_user_id': 123,
'_auth_user_backend': 'django.contrib.auth.backends.ModelBackend',
}
— plus of course other session data you set yourself
0đź‘Ť
Do you know if it is possible to build a solution that works the other way around, i.e., that makes it possible to log into an PHP app and use this login information to log into an Django app without having to type username/password again?
👤Matheus Moreira
- [Django]-Set image size limit and resize image if is needed
- [Django]-How to use Django South with third party apps loaded from egg?
- [Django]-Ordering in a Python module
- [Django]-Upload file to django server using curl
- [Django]-Why won't elastic beanstalk render css for the django admin site?
Source:stackexchange.com