diff --git a/pinax/api/authentication.py b/pinax/api/authentication.py index 0b7ba65..8cc8208 100644 --- a/pinax/api/authentication.py +++ b/pinax/api/authentication.py @@ -5,15 +5,9 @@ def decorator(func): return decorator -class Session(object): - - def authenticate(self, request): - if request.user.is_authenticated(): - return request.user - - class Anonymous(object): def authenticate(self, request): - from django.contrib.auth.models import AnonymousUser - return AnonymousUser() + if not request.user.is_authenticated(): + from django.contrib.auth.models import AnonymousUser + return AnonymousUser()