class Net::IMAP::SASL::Authenticators

Registry for SASL authenticators

Registered authenticators must respond to new or call (e.g. a class or a proc), receiving any credentials and options and returning an authenticator instance. The returned object represents a single authentication exchange and must not be reused for multiple authentication attempts.

An authenticator instance object must respond to process, receiving the server’s challenge and returning the client’s response. Optionally, it may also respond to initial_response? and done?. When initial_response? returns true, process may be called the first time with nil. When done? returns false, the exchange is incomplete and an exception should be raised if the exchange terminates prematurely.

See the source for PlainAuthenticator, XOAuth2Authenticator, and ScramSHA1Authenticator for examples.