Commit 34f3fca9 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki

astakos: fix incomplete previous commit

commit 1439d6383113b151b6a3316e320a0418fa30d421
parent d350c42a
......@@ -91,20 +91,26 @@ class Cookie():
COOKIE_NAME, value=cookie_value, expires=expire_fmt, path='/',
domain=COOKIE_DOMAIN, secure=COOKIE_SECURE
)
msg = 'Cookie [expiring %(auth_token_expires)s] set for %(uuid)s' % user.__dict__
msg = str(('Cookie [expiring %(auth_token_expires)s]',
'set for %(uuid)s')) % user.__dict__
logger._log(LOGGING_LEVEL, msg, [])
def __delete(self):
if not self.response:
raise ValueError(_(astakos_messages.NO_RESPONSE))
self.response.delete_cookie(COOKIE_NAME, path='/', domain=COOKIE_DOMAIN)
self.response.delete_cookie(
COOKIE_NAME, path='/', domain=COOKIE_DOMAIN)
msg = 'Cookie deleted for %(uuid)s' % self.__dict__
logger._log(LOGGING_LEVEL, msg, [])
def fix(self, response=None):
self.response = response or self.response
try:
if self.user.is_authenticated():
api_call = getattr(self.request, 'api_call', False)
if api_call:
return
if self.user.is_authenticated():
if not self.is_set or not self.is_valid:
self.__set()
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment