code: def _verify_cas1(ticket, service):
      
  
      params = {'ticket': ticket, 'service': service}
      url = (urljoin(settings.CAS_SERVER_URL, 'validate') + '?' +
             urlencode(params))
      page = urlopen(url)
  
      try:
          verified = page.readline().strip()
          if verified == 'yes':
              return page.readline().strip()
          else:
              return None
      finally:
          page.close()
docs: Verifies CAS 1.0 authentication ticket.
  
      :param: ticket
      :param: service
  
      Returns username on success and None on failure.