code: def verify_ticket(self, ticket):
          
          try:
              username, attributs = self.client.verify_ticket(ticket)[:2]
          except urllib.error.URLError:
              return False
          if username is not None:
              if attributs is None:
                  attributs = {}
              attributs["provider"] = self.provider.suffix
              self.username = username
              self.attributs = attributs
              user = FederatedUser.objects.update_or_create(
                  username=username,
                  provider=self.provider,
                  defaults=dict(attributs=attributs, ticket=ticket)
              )[0]
              user.save()
              self.federated_username = user.federated_username
              return True
          else:
              return False
docs: test ``ticket`` against the CAS provider, if valid, create a
              :class:`FederatedUser<cas_server.models.FederatedUser>` matching provider returned
              username and attributes.
  
              :param unicode ticket: The ticket to validate against the provider CAS
              :return: ``True`` if the validation succeed, else ``False``.
              :rtype: bool