Sha256: ff1fa567b81e789774226ada1bd9e1e270176ed70de74b974fda6ac7d1932e83

Contents?: true

Size: 969 Bytes

Versions: 24

Compression:

Stored size: 969 Bytes

Contents

# frozen_string_literal: true

# Backward compatible delegators from Net::IMAP to Net::IMAP::SASL.
module Net::IMAP::Authenticators

  # Deprecated.  Use Net::IMAP::SASL.add_authenticator instead.
  def add_authenticator(...)
    warn(
      "%s.%s is deprecated.  Use %s.%s instead." % [
        Net::IMAP, __method__, Net::IMAP::SASL, __method__
      ],
      uplevel: 1
    )
    Net::IMAP::SASL.add_authenticator(...)
  end

  # Deprecated.  Use Net::IMAP::SASL.authenticator instead.
  def authenticator(...)
    warn(
      "%s.%s is deprecated.  Use %s.%s instead." % [
        Net::IMAP, __method__, Net::IMAP::SASL, __method__
      ],
      uplevel: 1
    )
    Net::IMAP::SASL.authenticator(...)
  end

  Net::IMAP.extend self
end

class Net::IMAP
  PlainAuthenticator = SASL::PlainAuthenticator # :nodoc:
  deprecate_constant :PlainAuthenticator

  XOauth2Authenticator = SASL::XOAuth2Authenticator # :nodoc:
  deprecate_constant :XOauth2Authenticator
end

Version data entries

24 entries across 24 versions & 4 rubygems

Version Path
net-imap-0.4.3 lib/net/imap/authenticators.rb
net-imap-0.4.2 lib/net/imap/authenticators.rb
net-imap-0.4.1 lib/net/imap/authenticators.rb
net-imap-0.4.0 lib/net/imap/authenticators.rb