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

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

[elpa] externals/oauth2 bcf36ae 18/23: feat(oauth2): add state parameter


From: Stefan Monnier
Subject: [elpa] externals/oauth2 bcf36ae 18/23: feat(oauth2): add state parameter support, rename resource-url to scope
Date: Tue, 1 Dec 2020 16:32:01 -0500 (EST)

branch: externals/oauth2
commit bcf36aeebbcadee421b26f3eb658f5376cadfbb1
Author: Julien Danjou <julien@danjou.info>
Commit: Julien Danjou <julien@danjou.info>

    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 <xuchunyang56@gmail.com>
---
 oauth2.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/oauth2.el b/oauth2.el
index c8807f3..aaf74ee 100644
--- a/oauth2.el
+++ b/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 <julien@danjou.info>
-;; 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]