Function: auth-source-backends

auth-source-backends is a macro defined in auth-source.el.gz.

Signature

(auth-source-backends)

Documentation

List of usable backends from auth-sources.

Filter out backends with type ignore. A fallback backend is added to ensure, that at least read-passwd is called.

Source Code

;; Defined in /usr/src/emacs/lisp/auth-source.el.gz
(defmacro auth-source-backends ()
  "List of usable backends from `auth-sources'.
Filter out backends with type `ignore'.
A fallback backend is added to ensure, that at least `read-passwd' is called."
  `(or (seq-keep
        (lambda (entry)
          (and-let* ((backend (auth-source-backend-parse entry))
                     ((not (eq (slot-value backend 'type) 'ignore)))
                     backend)))
        auth-sources)
       ;; Fallback.
       (list (auth-source-backend
              :source ""
              :type 'read-passwd
              :search-function #'auth-source-read-passwd-search
              :create-function #'auth-source-read-passwd-create))))