def ar(self, ar): if not session.get('ar', None) == ar: session['ar'] = ar session.save() raise HTTPFound(location='/account/authenticate?redirect=%2Fauthorize%2F{0}'.format(ar)) try: return AuthenticationRequest.objects.get(id=ar, user=None, grant=None) except AuthenticationRequest.DoesNotExist: raise HTTPNotFound()
def ar(self, ar): if not session.get('ar', None) == ar: session['ar'] = ar session.save() raise HTTPFound( location='/account/authenticate?redirect=%2Fauthorize%2F{0}'. format(ar)) try: return AuthenticationRequest.objects.get(id=ar, user=None, grant=None) except AuthenticationRequest.DoesNotExist: raise HTTPNotFound()
def session(self, **kw): session.update(kw) session.save() return repr(session)