| Name | stevepatrick |
|---|---|
| Email Address | n/a |
| Posts | 2 |
-
- 2009-12-10 06:22:56
- Re: user.is_authenticated doesn´t recognize authenticated user
- Board » Django Standard Library » Authentication
-
yes, I have sniffed HTTP headers and there is no difference between my "special" browser headers an "normal" browser headers. The only difference is, of course that shows the same template but with different contents (if the user is authenticated can see different menu)
-
- 2009-12-10 05:32:18
- user.is_authenticated doesn´t recognize authenticated user
- Board » Django Standard Library » Authentication
-
Hi people,
I`m developing a Django app that is accessed with a Symbian component called Browser Control API. This API is used to create an instance of a web browser. When I try to access my Django app with this special browser (Browser Control API) the authentication process fails. I introduce correct username and password on authentication´s form and this code (from Django´s page) shows the "You provided a correct username and password!" message:
username = request.POST['username']
password = request.POST['password']
user = authenticate(username=username, password=password)
if user is not None:
if user.is_active:
print "You provided a correct username and password!"
loginDjango(request, user)
# Redirect to a success page.
else:
# Return a 'disabled account' error message
print "Your account has been disabled!"
else:
# Return an 'invalid login' error message.
print "Your username and password were incorrect."
but on my template, when I test wheter the user is authenticated with user.is_authenticated always returns false.
If I use the "normal" web browser woks fine, so I think there must be something wrong with Browser Control API.
Does anybody know how user.is_authenticated works and what could make this weird problem happend? maybe using cookies? should I set some extra capacity on my special browser? is there any other way to authenticate users?
Thanks


