Function: auth-source-user-and-password

auth-source-user-and-password is a byte-compiled function defined in auth-source.el.gz.

Signature

(auth-source-user-and-password HOST &optional USER)

Source Code

;; Defined in /usr/src/emacs/lisp/auth-source.el.gz
(defun auth-source-user-and-password (host &optional user)
  (let* ((auth-info (car
                     (if user
                         (auth-source-search
                          :host host
                          :user user
                          :max 1
                          :require '(:user :secret)
                          :create nil)
                       (auth-source-search
                        :host host
                        :max 1
                        :require '(:user :secret)
                        :create nil))))
         (user (plist-get auth-info :user))
         (password (auth-info-password auth-info)))
    (list user password auth-info)))