code: def uid(self):
          
          exp = datetime.datetime.utcnow() + self.expDelay
          claims = {
              'user_info': self.user_info,
              # Note that we use JWT standard 'exp' field to implement session expiration
              # we completely bypass twisted.web session expiration mechanisms
              'exp': calendar.timegm(datetime.datetime.timetuple(exp))}
  
          return jwt.encode(claims, self.site.session_secret, algorithm=SESSION_SECRET_ALGORITHM)
docs: uid is now generated automatically according to the claims.
  
          This should actually only be used for cookie generation