aboutsummaryrefslogtreecommitdiff
path: root/sx-auth.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-01-04 18:11:41 -0500
committerSean Allred <code@seanallred.com>2015-01-04 18:11:41 -0500
commitd3417ee55acc35a14ed71ccd69a593cfed3796bb (patch)
treefd70ff3f8773a4317ec1ea3f753338b374327318 /sx-auth.el
parent5efc20c03be3c668d780e1909a314bf244bc723d (diff)
parent97130cb7154fc494745d6b2a2a347c765403c5f3 (diff)
Merge pull request #198 from vermiculus/organize
Organize
Diffstat (limited to 'sx-auth.el')
-rw-r--r--sx-auth.el23
1 files changed, 16 insertions, 7 deletions
diff --git a/sx-auth.el b/sx-auth.el
index fca5392..686aa0c 100644
--- a/sx-auth.el
+++ b/sx-auth.el
@@ -1,4 +1,4 @@
-;;; sx-auth.el --- user authentication -*- lexical-binding: t; -*-
+;;; sx-auth.el --- user authentication -*- lexical-binding: t; -*-
;; Copyright (C) 2014 Sean Allred
@@ -19,6 +19,13 @@
;;; Commentary:
+;; This file handles logic related to authentication. This includes
+;; determining if a certain filter requires authentication (via the
+;; variable `sx-auth-filter-auth' and function `sx-auth--filter-p'),
+;; determining if a method requires authentication (via the variable
+;; `sx-auth-method-auth' and function `sx-auth--method-p'), and
+;; actually authenticating the user (with `sx-auth-authenticate').
+
;;; Code:
(require 'sx)
@@ -36,7 +43,9 @@
"Your access token.
This is needed to use your account to write questions, make
comments, and read your inbox. Do not alter this unless you know
-what you are doing!")
+what you are doing!
+
+This variable is set with `sx-auth-authenticate'.")
(defvar sx-auth-method-auth '((me . t)
(inbox . t)
@@ -65,11 +74,11 @@ what you are doing!")
upvote
(unanswered my-tags)))
"List of methods that require auth.
-Methods are of form (METHOD SUBMETHODS) where SUBMETHODS
- is (METHOD METHOD METHOD ...).
+Methods are of the form \(METHOD . SUBMETHODS) where SUBMETHODS
+ is \(METHOD METHOD METHOD ...).
If all SUBMETHODS require auth or there are no submethods, form
-will be (METHOD . t)")
+will be \(METHOD . t)")
(defvar sx-auth-filter-auth '(question.upvoted
question.downvoted
@@ -77,8 +86,8 @@ will be (METHOD . t)")
answer.downvoted
comment.upvoted)
"List of filter types that require auth.
-Keywords are of form (OBJECT TYPES) where TYPES is (FILTER FILTER
-FILTER).")
+Keywords are of the form \(OBJECT TYPES) where TYPES is \(FILTER
+FILTER FILTER).")
;;;###autoload
(defun sx-authenticate ()