code: def validate_nonce(self, username, iat, nonce):
          
          key = self.create_nonce_key(username, iat)
          used = cache.get(key, [])
          return nonce not in used
docs: Confirm that the given nonce hasn't already been used.
  
          :param username: Username as a string.
          :param iat: Unix timestamp float or integer of when the nonce was used.
          :param nonce: Nonce value.
          :return: True if nonce is valid, False if it is invalid.