def sendAuthTokenCookie(self, user, scope=None):
        days = int(self.model('setting').get(SettingKey.COOKIE_LIFETIME))
        token = self.model('token').createToken(user, days=days, scope=scope)

        cookie = cherrypy.response.cookie
        cookie['girderToken'] = str(token['_id'])
        cookie['girderToken']['path'] = '/'
        cookie['girderToken']['expires'] = days * 3600 * 24

        return token
Tests JSendMixin.success
dataset/ETHPy150Open girder/girder/girder/api/rest.py/Resource.sendAuthTokenCookie--crossover with--dataset/ETHPy150Open hfaran/Tornado-JSON/tests/test_tornado_json.py/TestJSendMixin.test_success