def discover_user(domain, claimed_id)
      url = fetch_host_meta(domain)
      if url.nil?
        return nil # Not a Google Apps domain
      end
      xrds = fetch_xrds(domain, url)
      user_url, authority = get_user_xrds_url(xrds, claimed_id)
      user_xrds = fetch_xrds(authority, user_url, false)
      return if user_xrds.nil?

      endpoints = OpenID::OpenIDServiceEndpoint.from_xrds(claimed_id, user_xrds)
      return [claimed_id, OpenID.get_op_or_user_services(endpoints)]
    end
def discover_user(domain, claimed_id)
      url = fetch_host_meta(domain)
      if url.nil?
        return nil # Not a Google Apps domain
      end
      xrds = fetch_xrds(domain, url)
      user_url, authority = get_user_xrds_url(xrds, claimed_id)
      user_xrds = fetch_xrds(authority, user_url, false)
      return if user_xrds.nil?

      endpoints = OpenID::OpenIDServiceEndpoint.from_xrds(claimed_id, user_xrds)
      return [claimed_id, OpenID.get_op_or_user_services(endpoints)]
    end
Handles discovery for a user's claimed ID.