Revision 44193110 api/middleware.py

b/api/middleware.py
15 15
            #Retrieve user from DB or other caching mechanism
16 16
            user = SynnefoUser.objects.filter(auth_token = request.META[self.auth_token])
17 17
            if user is None :
18
                return HttpResponseAuthenticationRequired(content='Athentication Required')
18
                return HttpResponseRedirect(content='Athentication Required')
19 19
            request.user = user
20 20
            return
21 21

  
......
30 30

  
31 31
            return HttpResponseRedirect(content= settings.SIBBOLLETH_HOST)
32 32

  
33
        return HttpResponseAuthenticationRequired(content='Athentication Required')
33
        return HttpResponseRedirect(content='Athentication Required')
34 34

  
35 35
#class HttpResponseAuthenticationRequired(HttpResponse):
36 36
#    status_code = 401

Also available in: Unified diff