bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#40228: [oauth2.el] oauth2-auth-and-store: Add optional argument stat


From: Xu Chunyang
Subject: bug#40228: [oauth2.el] oauth2-auth-and-store: Add optional argument state
Date: Thu, 26 Mar 2020 04:32:06 +0800

Oops, I forget changing all resource-url, here is the updated patch.

diff -u --label /Users/xcy/.emacs.d/elpa-27.0.90/oauth2-0.11/oauth2.el
--label \#\<buffer\ oauth2.el\>
/Users/xcy/.emacs.d/elpa-27.0.90/oauth2-0.11/oauth2.el
/var/folders/7f/s191h4q97p90374yw15ssrs00000gn/T/buffer-content-3H8LwW
--- /Users/xcy/.emacs.d/elpa-27.0.90/oauth2-0.11/oauth2.el
+++ #<buffer oauth2.el>
@@ -149,11 +149,11 @@
   (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))
-         (id (oauth2-compute-id auth-url token-url resource-url))
+         (id (oauth2-compute-id auth-url token-url scope))
          (plist (cdr (plstore-get plstore id))))
     ;; Check if we found something matching this access
     (if plist
@@ -167,7 +167,7 @@
                            :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)

Diff finished.  Thu Mar 26 04:31:13 2020





reply via email to

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