Sha256: 819cd049b300582e523fc5d6a40a9c4167dc0d2be8d161c879224e6a46b995b0

Contents?: true

Size: 1.18 KB

Versions: 24

Compression:

Stored size: 1.18 KB

Contents

# frozen_string_literal: true

module Net
  class IMAP
    module SASL

      module ProtocolAdapters
        # This API is experimental, and may change.
        module Generic
          def command_name;     "AUTHENTICATE" end
          def service;          raise "Implement in subclass or module" end
          def host;             client.host end
          def port;             client.port end
          def encode_ir(string) string.empty? ? "=" : encode(string) end
          def encode(string)    [string].pack("m0") end
          def decode(string)    string.unpack1("m0") end
          def cancel_response;  "*" end
        end

        # See RFC-3501 (IMAP4rev1), RFC-4959 (SASL-IR capability),
        # and RFC-9051 (IMAP4rev2).
        module IMAP
          include Generic
          def service; "imap" end
        end

        # See RFC-4954 (AUTH capability).
        module SMTP
          include Generic
          def command_name; "AUTH" end
          def service; "smtp" end
        end

        # See RFC-5034 (SASL capability).
        module POP
          include Generic
          def command_name; "AUTH" end
          def service; "pop" end
        end

      end

    end
  end
end

Version data entries

24 entries across 24 versions & 5 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/net-imap-0.4.14/lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.18 lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.17 lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.16 lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.15 lib/net/imap/sasl/protocol_adapters.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/net-imap-0.4.14/lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.14 lib/net/imap/sasl/protocol_adapters.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/net-imap-0.4.11/lib/net/imap/sasl/protocol_adapters.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/net-imap-0.4.11/lib/net/imap/sasl/protocol_adapters.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/net-imap-0.4.11/lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.13 lib/net/imap/sasl/protocol_adapters.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/net-imap-0.4.12/lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.12 lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.10 lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.9.1 lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.9 lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.8 lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.7 lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.6 lib/net/imap/sasl/protocol_adapters.rb
net-imap-0.4.5 lib/net/imap/sasl/protocol_adapters.rb