branch: elpa/fedi
commit 402702854e9430735bf8dad43319c8aecff53488
Author: marty hiatt <martianhiatus [a t] riseup [d o t] net>
Commit: marty hiatt <martianhiatus [a t] riseup [d o t] net>

    notes
---
 fedi.el | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/fedi.el b/fedi.el
index 339665119d2..b1ca53e764c 100644
--- a/fedi.el
+++ b/fedi.el
@@ -39,6 +39,22 @@ construct function names in `fedi-request'.")
 ;; these differ highly between services. but you can easily modify it to
 ;; incorporate auth tokens. see `lem-request' in lem.el, or
 ;; `mastodon-http--authorized-request' for examples of how to handle this.
+
+;; maybe if you add extra-headers, extra-params args here, you can handle
+;; various auth types?
+;; e.g. masto:
+;; (let (((url-request-extra-headers
+;;         (unless ,unauthenticated-p
+;;           (list (cons "Authorization"
+;;                       (concat "Bearer " 
(mastodon-auth--access-token)))))))))
+
+;; eg lem:
+;; (params (unless ,no-auth
+;;           (append `(("auth" . ,lem-auth-token))
+;;                   ,params)))
+
+;; and then you can remove  `mastodon-http--authorized-request'
+
 (defmacro fedi-request (method name endpoint &optional args params json)
   "Create http request function NAME, using http METHOD, for ENDPOINT.
 ARGS are for the function, PARAMS is an alist of form parameters.

Reply via email to