class Net::IMAP::SASL::ExternalAuthenticator

established external to SASL, for example by TLS certificate or IPSec.
The EXTERNAL mechanism requests that the server use client credentials<br><br>Net::IMAP#authenticate.<br>RFC-4422. See
Authenticator for the “EXTERNAL” SASL mechanism, as specified by

def done?; @done end

does *not* indicate success.
The authentication should not succeed unless this returns true, but it

Returns true when the initial client response was sent.
def done?; @done end

def initial_response?; true end

+EXTERNAL+ can send an initial client response.

initial_response? -> true
:call-seq:
def initial_response?; true end

def initialize(user = nil, authzid: nil, username: nil, **)

Any other keyword parameters are quietly ignored.

external credentials.
authentication identity is established for the client by the
_authorization_ identity and not the _authentication_ identity. The
Note that, unlike some other authenticators, +username+ sets the

_optional_ #username ― An alias for #authzid.

* _optional_ #authzid ― Authorization identity to act as or on behalf of.

==== Parameters

method.
this, see Net::IMAP#authenticate or your client's authentication
specified in RFC-4422[https://www.rfc-editor.org/rfc/rfc4422]. To use
Creates an Authenticator for the "+EXTERNAL+" SASL mechanism, as

new(username = nil, **) -> authenticator
new(username: nil, **) -> authenticator
new(authzid: nil, **) -> authenticator
:call-seq:
def initialize(user = nil, authzid: nil, username: nil, **)
  authzid ||= username || user
  @authzid = authzid&.to_str&.encode "UTF-8"
  if @authzid&.match?(/\u0000/u) # also validates UTF8 encoding
    raise ArgumentError, "contains NULL"
  end
  @done = false
end

def process(_)

Returns #authzid, or an empty string if there is no authzid.
def process(_)
  authzid || ""
ensure
  @done = true
end