django provide same session everywhere

I'm working on a django app which use an external base to authenticate user. After login, some informations are retrieved to the session. The issue is that this initialized session is the same with the same session_id whatever the browser or the desktop I use without re-authenticate...

authentication:

def login(request):
    if request.method == 'POST':
        login = request.POST["login"]
        password = request.POST["password"]
        #do something to authenticate by requesting an url
        request.session['infos'] = #infos string recieved
        return HttpResponseRedirect(reverse('WebSite:index'))

MIDDLEWARE_CLASSES contains django.contrib.sessions.middleware.SessionMiddleware

SESSION_ENGINE = "django.contrib.sessions.backends.db"

INSTALLED_APPS contains django.contrib.sessions

An other effect of this is that after being authenticated somewhere, I get a CSRF failure when I try elsewhere...

Thanks for helping me!

Answers


The answer was in the cache:

The cache made django provide the same cookie at every request with the same session_id. So I deactivacted it until I set the cache with better settings.


Need Your Help

Counts the occurrence of data in table1 based on presence of same data in table2 and group summary by year and month

mysql group-by pivot

Step 1 - Count all the rows in t1 where field1 is present (i.e. not null) as Count1 and group by year and month.

Good path minimization algorithm 2D in Java and VTK

java path vtk minimization

I would like to find an algorithm for path minimization with some constraints in Java with VTK. As input I am going to give an area for the polygon which is constant, the center of mass of the pol...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.