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
- 
    
      #cancel_response  
    
    Returns the message used by the client to abort an authentication exchange. 
- 
    
      #command_name  
    
    The name of the protocol command used to initiate a SASL authentication exchange. 
- 
    
      #decode(string)  
    
    Decodes a server challenge string. 
- 
    
      #encode(string)  
    
    Encodes a client response string. 
- 
    
      #encode_ir(string)  
    
    Encodes an initial response string. 
- 
    
      #service  
    
    A service name from the GSSAPI/Kerberos/SASL Service Names registry. 
Instance Method Details
#cancel_response
Returns the message used by the client to abort an authentication exchange.
The generic implementation returns "*".
# 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".
# 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.
# 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.
# 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.
# 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.
# File 'lib/net/imap/sasl/protocol_adapters.rb', line 51
def service; "host" end