emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OAuth2 implementation in Elisp


From: Ted Zlatanov
Subject: Re: OAuth2 implementation in Elisp
Date: Mon, 26 Sep 2011 16:26:46 -0500
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

On Mon, 26 Sep 2011 22:29:58 +0200 Tassilo Horn <address@hidden> wrote: 

TH> Lars Magne Ingebrigtsen <address@hidden> 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 <textarea>...</textarea>.

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 <title>
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]