Skip to content
Advertisement

Manually validate a django session id is currently authenticated

I need to have a function tell me if a Django session-id is currently authenticated or not. I understand this is already built into Django and I have that working just fine.

But I have an external app that gets passed a session id, and when it passes the session-id string back to Django I need to validate that this session id is valid and currently authenticated.

Where do I start reusing some of the built-in functions Django 1.2 has?

Advertisement

Answer

You can do it like this (not tested, but it shows you a possible way):

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement