123456789_123456789_123456789_123456789_123456789_

Module: Net::IMAP::SASL::ProtocolAdapters::Generic

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/net/imap/sasl/protocol_adapters.rb

Overview

See SASL::ProtocolAdapters@Interface.

Instance Method Summary

Instance Method Details

#cancel_response

Returns the message used by the client to abort an authentication exchange.

The generic implementation returns "*".

[ GitHub ]

  
# File 'lib/net/imap/sasl/protocol_adapters.rb', line 73

def cancel_response;  "*" end

#command_name

The name of the protocol command used to initiate a SASL authentication exchange.

The generic implementation returns "AUTHENTICATE".

[ GitHub ]

  
# File 'lib/net/imap/sasl/protocol_adapters.rb', line 44

def command_name;     "AUTHENTICATE" end

#decode(string)

Decodes a server challenge string.

The generic implementation returns the Base64 decoding of string.

[ GitHub ]

  
# File 'lib/net/imap/sasl/protocol_adapters.rb', line 67

def decode(string)    string.unpack1("m0") end

#encode(string)

Encodes a client response string.

The generic implementation returns the Base64 encoding of string.

[ GitHub ]

  
# File 'lib/net/imap/sasl/protocol_adapters.rb', line 62

def encode(string)    [string].pack("m0") end

#encode_ir(string)

Encodes an initial response string.

The generic implementation returns the result of #encode, or returns "=" when string is empty.

[ GitHub ]

  
# File 'lib/net/imap/sasl/protocol_adapters.rb', line 57

def encode_ir(string) string.empty? ? "=" : encode(string) end

#service

A service name from the GSSAPI/Kerberos/SASL Service Names registry.

The generic implementation returns "host", which is the generic GSSAPI host-based service name.

[ GitHub ]

  
# File 'lib/net/imap/sasl/protocol_adapters.rb', line 51

def service;          "host" end