'Generate an unguessable and unauthenticated new session ID.'

def make_session_id(self, request):

    session_id = None
    while ((session_id in self.sessions) or (session_id is None)):
        session_id = okay_random(32, self.secret, ('%s' % (request and request.headers)))
    return session_id
