summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@fitzsim.org>2023-04-29 02:02:20 -0400
committerThomas Fitzsimmons <fitzsim@fitzsim.org>2023-04-29 02:02:20 -0400
commit8ea929c68541cf4fef1e47e49d47723545142b0f (patch)
tree2fc9c260b45210e161feb1aa8638085700d69f4c
parentaa62f012d0d774b24008c804e8d4aa9957982289 (diff)
Update config format and Emacs 26 support
* url-http-oauth-demo.el: Use cons pairs in url-http-oauth-interpose call. (url-http-oauth-demo-get-profile-name): Use url-http-oauth-json-parse-buffer instead of json-parse-buffer.
-rw-r--r--url-http-oauth-demo.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/url-http-oauth-demo.el b/url-http-oauth-demo.el
index 0c32aba..5bdad98 100644
--- a/url-http-oauth-demo.el
+++ b/url-http-oauth-demo.el
@@ -109,19 +109,19 @@
'(;; This is the client identifier, which can be generated by the
;; user, or by the Emacs library developer, at
;; "https://meta.sr.ht/oauth2/client-registration".
- ("client-identifier" "107ba4a9-2a96-4420-8818-84ec1f112405")
+ ("client-identifier" . "107ba4a9-2a96-4420-8818-84ec1f112405")
;; This is the URL at which the `url-http-oauth-demo' package will
;; access resources. Everything that follows is for authentication
;; and authorization to satisfy OAuth 2.0 requirements.
- ("url" "https://meta.sr.ht/query")
+ ("urls". ("https://meta.sr.ht/query"))
;; These are the authorization and token endpoints, published in
;; "https://man.sr.ht/meta.sr.ht/oauth.md". There is no way to
;; autodiscover them from "https://meta.sr.ht/query".
- ("authorization-endpoint" "https://meta.sr.ht/oauth2/authorize")
- ("access-token-endpoint" "https://meta.sr.ht/oauth2/access-token")
+ ("authorization-endpoint" . "https://meta.sr.ht/oauth2/authorize")
+ ("access-token-endpoint" . "https://meta.sr.ht/oauth2/access-token")
;; This is the list of features to which Emacs is requesting the
;; server grant it access.
- ("scope" "meta.sr.ht/PROFILE:RO")
+ ("scope" . "meta.sr.ht/PROFILE:RO")
;; This is the client secret, which will be generated as part of
;; client registration, at
;; "https://meta.sr.ht/oauth2/client-registration". If the user
@@ -134,7 +134,7 @@
;; ZU3P7ant959W1RkzgvXSeNf2mdxuk5EfA==". The user would paste this
;; 88 character client secret string into the minibuffer when
;; prompted.
- ("client-secret-method" prompt)))
+ ("client-secret-method" . prompt)))
;;;###autoload
(defun url-http-oauth-demo-get-profile-name ()
@@ -165,7 +165,7 @@ Print the result to *Messages*. Return the name."
"me"
(gethash
"data"
- (json-parse-buffer)))))))
+ (url-http-oauth-json-parse-buffer)))))))
(provide 'url-http-oauth-demo)