* bug#36024: 26.2.50; [PATCH] Fix oauth2 to pass a type parameter when requesting authorization
@ 2019-05-31 12:17 Damien Cassou
2019-05-31 13:27 ` Damien Cassou
0 siblings, 1 reply; 2+ messages in thread
From: Damien Cassou @ 2019-05-31 12:17 UTC (permalink / raw)
To: 36024; +Cc: Julien Danjou, Rüdiger Sonderfeld
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
Hi,
it seems that oauth2 doesn't pass any type parameter when requesting
authorization even though it seems to be required by the spec. See the
patch for details.
I'm no expert so please double-check.
--
Damien Cassou
Företagsplatsen AB
Phone/Fax: +46 (0)8 774 63 00
Mobile: +33 (0)6 80 50 18 91
Address: Skeppsbron 26, 4tr, SE-111 30 Stockholm
Web: www.foretagsplatsen.se
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-oauth2-to-pass-a-type-parameter-when-requesting-.patch --]
[-- Type: text/x-patch, Size: 1189 bytes --]
From a0d2132e5b3c8a47c4d2a2ec9d4233127ad0214c Mon Sep 17 00:00:00 2001
From: Damien Cassou <damien@cassou.me>
Date: Fri, 31 May 2019 14:07:46 +0200
Subject: [PATCH] Fix oauth2 to pass a type parameter when requesting
authorization
* oauth2.el (oauth2-request-authorization): Add a "type=user_agent"
parameter to the URL as it seems to be required by the protocol:
https://tools.ietf.org/html/draft-ietf-oauth-v2-05#section-3.5.1
---
oauth2.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/oauth2.el b/oauth2.el
index c8807f3..f6438ba 100644
--- a/oauth2.el
+++ b/oauth2.el
@@ -48,6 +48,7 @@ (defun oauth2-request-authorization (auth-url client-id &optional scope state re
(if (string-match-p "\?" auth-url) "&" "?")
"client_id=" (url-hexify-string client-id)
"&response_type=code"
+ "&type=user_agent"
"&redirect_uri=" (url-hexify-string (or redirect-uri "urn:ietf:wg:oauth:2.0:oob"))
(if scope (concat "&scope=" (url-hexify-string scope)) "")
(if state (concat "&state=" (url-hexify-string state)) "")))
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-31 13:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-31 12:17 bug#36024: 26.2.50; [PATCH] Fix oauth2 to pass a type parameter when requesting authorization Damien Cassou
2019-05-31 13:27 ` Damien Cassou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.