Function: erc-sasl--create-client

erc-sasl--create-client is a byte-compiled function defined in erc-sasl.el.gz.

Signature

(erc-sasl--create-client MECHANISM)

Documentation

Create and return a new SASL client object for MECHANISM.

Implementations

(erc-sasl--create-client (_ (eql ecdsa-nist256p-challenge))) in `erc-sasl.el'.

Create and return a new ECDSA-NIST256P-CHALLENGE client.

(erc-sasl--create-client (_ (eql scram-sha-512))) in `erc-sasl.el'.

Create and return a new SCRAM-SHA-512 client.

(erc-sasl--create-client (_ (eql scram-sha-256))) in `erc-sasl.el'.

Create and return a new SCRAM-SHA-256 client.

(erc-sasl--create-client (_ (eql plain))) in `erc-sasl.el'.

Create and return a new PLAIN client object.

(erc-sasl--create-client MECHANISM) in `erc-sasl.el'.

Undocumented

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-sasl.el.gz
(cl-defgeneric erc-sasl--create-client (mechanism)
  "Create and return a new SASL client object for MECHANISM."
  (let ((sasl-mechanism-alist (copy-sequence sasl-mechanism-alist))
        (sasl-mechanisms sasl-mechanisms)
        (name (upcase (symbol-name mechanism)))
        (feature (intern-soft (concat "erc-sasl-" (symbol-name mechanism))))
        client)
    (when feature
      (setf (alist-get name sasl-mechanism-alist nil nil #'equal) `(,feature))
      (cl-pushnew name sasl-mechanisms :test #'equal)
      (setq client (sasl-make-client (sasl-find-mechanism (list name))
                                     (erc-sasl--get-user)
                                     "N/A" "N/A"))
      (sasl-client-set-property client 'authenticator-name
                                (alist-get 'authzid erc-sasl--options))
      client)))