views:

72

answers:

1

I have a DJANGO application divide in two sites(A middleware called site A and a front end called site B) and I need to share authentication between them.

The site A is called by B to send username and password. Then A return an HTTP response to B and use HTTPResponseRedirect('/welcome') to redirect in a local function (protected by @login_required decorator)...

However even if my user is well loged in A the B local function redirect me to my loginform. If I comment the @login_required decorator, the function is well called.

I think my login_required doesn't received about authentication status...

login_required work well with site A functions.

May you help me?

A: 

First I am apologize for answering just now. Actually I m using django-registration in the aim to authenticate and register users. My modules are located into the front end side.

What I call front end is an independant application running on a public front end server.

Middleware is another application running on another server whish is able to communicate only with the Front end application.

I was wondering if it was not better for security reason to move my authentication module in a middleware server and use the front end server to foward authentication and registration request to the mid server.

David