From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: OAuth2 implementation in Elisp Date: Mon, 26 Sep 2011 16:26:46 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87ty7zvvu1.fsf@lifelogs.com> References: <87sjnojl7j.fsf@keller.adm.naquadah.org> <4E7BAFA4.8090800@dogan.se> <4E7BAFE2.2090102@dogan.se> <87k490jkaw.fsf@keller.adm.naquadah.org> <87d3eo984j.fsf@lifelogs.com> <87mxdsbx1n.fsf@keller.adm.naquadah.org> <87litc695c.fsf@lifelogs.com> <87vcsfmxzd.fsf@keller.adm.naquadah.org> <87y5xb4bgj.fsf@lifelogs.com> <87ehz32vm5.fsf@keller.adm.naquadah.org> <8762kf2uzg.fsf@keller.adm.naquadah.org> <87zkhr15pi.fsf@lifelogs.com> <87vcsfhydf.fsf@thinkpad.tsdh.de> <87ehz3hws9.fsf@thinkpad.tsdh.de> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1317072622 13605 80.91.229.12 (26 Sep 2011 21:30:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 26 Sep 2011 21:30:22 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 26 23:30:18 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R8Iki-0005vT-KZ for ged-emacs-devel@m.gmane.org; Mon, 26 Sep 2011 23:30:16 +0200 Original-Received: from localhost ([::1]:43734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8Ikh-0007AT-TG for ged-emacs-devel@m.gmane.org; Mon, 26 Sep 2011 17:30:15 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8Ikf-0007A1-KS for emacs-devel@gnu.org; Mon, 26 Sep 2011 17:30:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R8Ikb-0006XG-Tq for emacs-devel@gnu.org; Mon, 26 Sep 2011 17:30:13 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:50988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8Ikb-0006We-Hb for emacs-devel@gnu.org; Mon, 26 Sep 2011 17:30:09 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R8IkZ-0005rR-4n for emacs-devel@gnu.org; Mon, 26 Sep 2011 23:30:07 +0200 Original-Received: from 38.98.147.133 ([38.98.147.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Sep 2011 23:30:07 +0200 Original-Received: from tzz by 38.98.147.133 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Sep 2011 23:30:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 27 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.133 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:BIPJVCbw/7FQ2yhHahNR5/V2Xic= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:144359 Archived-At: On Mon, 26 Sep 2011 22:29:58 +0200 Tassilo Horn wrote: TH> Lars Magne Ingebrigtsen writes: >>> But I understand Julien so that this is really arbitrary: some >>> JavaScript that has to be interpreted, an image, a video (with 30 >>> seconds beer ad before), or even some flash stuff. >> >> If it's JS or Flash, then Emacs can't do it. (Yet. :-) >> But is that common? TH> Not sure. I've just test-driven Julien's google-contacts.el which uses TH> oauth2.el, and the google page showing the auth code constists of first TH> a large part of JavaScript and CSS stuff and then plain but complex HTML TH> where the auth code is inside a . TH> Possibly, one could rip out the code of the page with some heuristics, TH> but that doesn't look very promising in the general case... Experimenting with the Google OAuth2 API (they have docs and examples at http://code.google.com/apis/accounts/docs/OAuth2.html), I think it may be possible to extract the bootstrap auth code from the HTML tag. The title is filled in before any Javascript is run--it comes back in the HTTP response. I don't know if that will work in the general case, as you say, but at least for that one big provider it would be possible to parse that part of the interaction. Ted