def remember(self, environ, identity): cookies = get_cookies(environ) if identity is not None and not self.cookie_name in cookies: aes = environ['aes_cipher'] val = base64.b64encode(bauth(aes, '%s:%s' % ( identity['login'], identity['password']))) identity['tokens'] = environ['remote.domains'] identity['repoze.who.userid'] = val return Basetkt.remember(self, environ, identity)
def remember(self, environ, identity): if environ.get('repoze.who.identity'): return AuthTktCookiePlugin.remember(self, environ, identity) else: return self.forget(environ, identity)