Next: , Up: Data types

3.1 Mechanisms

A mechanism (sasl-mechanism object) is a schema of the sasl authentication mechanism driver.

— Variable: sasl-mechanisms

A list of mechanism names.

— Function: sasl-find-mechanism mechanisms

Retrieve an appropriate mechanism. This function compares mechanisms and sasl-mechanisms then returns appropriate sasl-mechanism object.

          (let ((sasl-mechanisms '("CRAM-MD5" "DIGEST-MD5")))
            (setq mechanism (sasl-find-mechanism server-supported-mechanisms)))
— Function: sasl-mechanism-name mechanism

Return name of mechanism, a string.

If you want to write an authentication mechanism driver (Back end drivers), use sasl-make-mechanism and modify sasl-mechanisms and sasl-mechanism-alist correctly.

— Function: sasl-make-mechanism name steps

Allocate a sasl-mechanism object. This function takes two parameters—name of the mechanism, and a list of authentication functions.

          (defconst sasl-anonymous-steps
            '(identity                            ;no initial response
              sasl-anonymous-response))
          
          (put 'sasl-anonymous 'sasl-mechanism
               (sasl-make-mechanism "ANONYMOUS" sasl-anonymous-steps))