From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: OAuth2 implementation in Elisp
Date: Sun, 25 Sep 2011 08:31:27 -0500 [thread overview]
Message-ID: <87litc695c.fsf@lifelogs.com> (raw)
In-Reply-To: 87mxdsbx1n.fsf@keller.adm.naquadah.org
On Sun, 25 Sep 2011 14:56:20 +0200 Julien Danjou <julien@danjou.info> wrote:
JD> On Sun, Sep 25 2011, Ted Zlatanov wrote:
>> Could you format it to wrap the long lines?
JD> Long? What's the limit? The longest is 122, which does not seem long to
JD> me in 2011.
If you could stay under 78 it would be polite. I can't find the
reference but I'm pretty sure for Emacs submissions at least it's
required.
>> Some usage examples would be nice.
JD> Sure, I'll may be add, but the commentary should be enough for anybody
JD> to start using it. :)
It wasn't for me, sorry. I don't know OAuth2 well.
>> I don't think you are encoding URL parameters so your URLs are not
>> safely constructed. I think the url libraries have functions for that;
>> you could also submit a POST (if OAuth2 supports it, I don't know the
>> spec) so you don't have to encode things at all.
JD> It is a POST request for the authorization request. And about encoding,
JD> I'm not sure there's actually a problem, but if you could point me on a
JD> specific point I'd be glad to take a look.
#+begin_src lisp
(browse-url (concat auth-url
(if (string-match-p "\?" auth-url) "&" "?")
"client_id=" client-id
"&response_type=code&redirect_uri=urn:ietf:wg:oauth:2.0:oob"
(if scope (concat "&scope=" (url-hexify-string scope)) "")
(if state (concat "&state=" state) "")))
#+end_src
This is not a POST and `client_id' for instance could have invalid
characters for a URL.
>> Can `oauth2-request-authorization' be automated so the user doesn't have
>> to enter a string they see on the screen? That seems painful.
JD> If Emacs was a Web app, yes.
That makes no sense. You are asking the user to enter information Emacs
is displaying. Can you grab that information for them, so they don't
have to enter it?
Thanks
Ted
next prev parent reply other threads:[~2011-09-25 13:31 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-22 21:55 OAuth2 implementation in Elisp Julien Danjou
2011-09-22 21:59 ` Deniz Dogan
2011-09-22 22:00 ` Deniz Dogan
2011-09-22 22:15 ` Julien Danjou
2011-09-25 11:25 ` Ted Zlatanov
2011-09-25 12:56 ` Julien Danjou
2011-09-25 13:31 ` Ted Zlatanov [this message]
2011-09-25 17:14 ` Karl Fogel
2011-09-25 20:50 ` Justin Lilly
2011-09-26 9:52 ` Julien Danjou
2011-09-26 14:36 ` Ted Zlatanov
2011-09-26 15:04 ` Julien Danjou
2011-09-26 15:15 ` Lars Magne Ingebrigtsen
2011-09-26 15:17 ` Julien Danjou
2011-09-26 16:24 ` Lars Magne Ingebrigtsen
2011-09-27 9:40 ` Julien Danjou
2011-09-27 23:25 ` Richard Stallman
2011-09-26 17:47 ` joakim
2011-09-26 19:09 ` Ted Zlatanov
2011-09-26 19:55 ` Tassilo Horn
2011-09-26 19:59 ` Lars Magne Ingebrigtsen
2011-09-26 20:29 ` Tassilo Horn
2011-09-26 20:31 ` Lars Magne Ingebrigtsen
2011-09-26 21:26 ` Ted Zlatanov
2011-09-27 9:43 ` Julien Danjou
2011-09-27 9:50 ` joakim
2011-09-27 10:14 ` Ted Zlatanov
2011-09-27 12:22 ` joakim
2011-09-27 20:17 ` Ted Zlatanov
2011-09-26 17:00 ` Ted Zlatanov
2011-09-28 3:35 ` Vijay Lakshminarayanan
2011-09-26 21:23 ` Ted Zlatanov
2011-09-27 10:18 ` Ted Zlatanov
2011-09-27 11:42 ` Julien Danjou
2011-09-27 20:20 ` Ted Zlatanov
2011-09-25 20:02 ` Deniz Dogan
2011-09-23 4:34 ` Stefan Monnier
2011-09-23 7:31 ` Julien Danjou
2011-09-23 8:23 ` Andreas Röhler
2011-09-23 8:48 ` Michael Albinus
2011-09-23 9:02 ` Julien Danjou
2011-09-23 9:32 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87litc695c.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).