aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-auth.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mastodon-auth.el')
-rw-r--r--lisp/mastodon-auth.el30
1 files changed, 15 insertions, 15 deletions
diff --git a/lisp/mastodon-auth.el b/lisp/mastodon-auth.el
index 0b0c703..cd74ef8 100644
--- a/lisp/mastodon-auth.el
+++ b/lisp/mastodon-auth.el
@@ -73,12 +73,12 @@ If no auth-sources file, runs `mastodon-auth--generate-token-no-storing-credenti
"Make POST to generate auth token, without using auth-sources file."
(mastodon-http--post
(concat mastodon-instance-url "/oauth/token")
- `(("client_id" . ,(plist-get (mastodon-client) :client_id))
- ("client_secret" . ,(plist-get (mastodon-client) :client_secret))
- ("grant_type" . "password")
- ("username" . ,(read-string "Email: " user-mail-address))
- ("password" . ,(read-passwd "Password: "))
- ("scope" . "read write follow"))
+ `(("client_id" ,(plist-get (mastodon-client) :client_id))
+ ("client_secret" ,(plist-get (mastodon-client) :client_secret))
+ ("grant_type" "password")
+ ("username" ,(read-string "Email: " user-mail-address))
+ ("password" ,(read-passwd "Password: "))
+ ("scope" "read write follow"))
nil
:unauthenticated))
@@ -98,15 +98,15 @@ Reads and/or stores secrets in `MASTODON-AUTH-SOURCE-FILE'."
(prog1
(mastodon-http--post
(concat mastodon-instance-url "/oauth/token")
- `(("client_id" . ,(plist-get (mastodon-client) :client_id))
- ("client_secret" . ,(plist-get (mastodon-client) :client_secret))
- ("grant_type" . "password")
- ("username" . ,(plist-get credentials-plist :user))
- ("password" . ,(let ((secret (plist-get credentials-plist :secret)))
- (if (functionp secret)
- (funcall secret)
- secret)))
- ("scope" . "read write follow"))
+ `(("client_id" ,(plist-get (mastodon-client) :client_id))
+ ("client_secret" ,(plist-get (mastodon-client) :client_secret))
+ ("grant_type" "password")
+ ("username" ,(plist-get credentials-plist :user))
+ ("password" ,(let ((secret (plist-get credentials-plist :secret)))
+ (if (functionp secret)
+ (funcall secret)
+ secret)))
+ ("scope" "read write follow"))
nil
:unauthenticated)
(when (functionp (plist-get credentials-plist :save-function))