Class: Net::IMAP::CramMD5Authenticator

Inherits:
Object
  • Object
show all
Defined in:
lib/net/imap/authenticators/cram_md5.rb

Overview

Authenticator for the “CRAM-MD5” SASL mechanism, specified in RFC2195. See Net::IMAP#authenticate.

Deprecated

CRAM-MD5 is obsolete and insecure. It is included for compatibility with existing servers. draft-ietf-sasl-crammd5-to-historic recommends using SCRAM-* or PLAIN protected by TLS instead.

Additionally, RFC8314 discourage the use of cleartext and recommends TLS version 1.2 or greater be used for all traffic. With TLS CRAM-MD5 is okay, but so is PLAIN

Instance Method Summary collapse

Instance Method Details

#process(challenge) ⇒ Object



19
20
21
22
# File 'lib/net/imap/authenticators/cram_md5.rb', line 19

def process(challenge)
  digest = hmac_md5(challenge, @password)
  return @user + " " + digest
end