emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master 18a55dc: feat(oauth2): add state parameter support, rename


From: Julien Danjou
Subject: [elpa] master 18a55dc: feat(oauth2): add state parameter support, rename resource-url to scope
Date: Fri, 27 Mar 2020 03:52:11 -0400 (EDT)

branch: master
commit 18a55dc8bd34328fa5b281b399d882bc82a1fba6
Author: Julien Danjou <address@hidden>
Commit: Julien Danjou <address@hidden>

    feat(oauth2): add state parameter support, rename resource-url to scope
    
    The resource-url is actually a scope.
    Add support for optional state parameter.
    
    This is version 0.12.
    
    Thanks Xu Chunyang <address@hidden>
---
 packages/oauth2/oauth2.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/packages/oauth2/oauth2.el b/packages/oauth2/oauth2.el
index c8807f3..aaf74ee 100644
--- a/packages/oauth2/oauth2.el
+++ b/packages/oauth2/oauth2.el
@@ -1,9 +1,9 @@
 ;;; oauth2.el --- OAuth 2.0 Authorization Protocol
 
-;; Copyright (C) 2011-2016 Free Software Foundation, Inc
+;; Copyright (C) 2011-2020 Free Software Foundation, Inc
 
 ;; Author: Julien Danjou <address@hidden>
-;; Version: 0.11
+;; Version: 0.12
 ;; Keywords: comm
 
 ;; This file is part of GNU Emacs.
@@ -149,7 +149,7 @@ This allows to store the token in an unique way."
   (secure-hash 'md5 (concat auth-url token-url resource-url)))
 
 ;;;###autoload
-(defun oauth2-auth-and-store (auth-url token-url resource-url client-id 
client-secret &optional redirect-uri)
+(defun oauth2-auth-and-store (auth-url token-url scope client-id client-secret 
&optional redirect-uri state)
   "Request access to a resource and store it using `plstore'."
   ;; We store a MD5 sum of all URL
   (let* ((plstore (plstore-open oauth2-token-file))
@@ -167,7 +167,7 @@ This allows to store the token in an unique way."
                            :token-url token-url
                            :access-response (plist-get plist :access-response))
       (let ((token (oauth2-auth auth-url token-url
-                                client-id client-secret resource-url nil 
redirect-uri)))
+                                client-id client-secret scope state 
redirect-uri)))
         ;; Set the plstore
         (setf (oauth2-token-plstore token) plstore)
         (setf (oauth2-token-plstore-id token) id)



reply via email to

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