Class: Net::IMAP::NTLMAuthenticator
- Inherits:
-
Object
- Object
- Net::IMAP::NTLMAuthenticator
- Defined in:
- lib/ntlm/imap.rb
Overview
ResponseParser
Instance Method Summary collapse
-
#initialize(user, domain, password) ⇒ NTLMAuthenticator
constructor
A new instance of NTLMAuthenticator.
- #process(data) ⇒ Object
Constructor Details
#initialize(user, domain, password) ⇒ NTLMAuthenticator
Returns a new instance of NTLMAuthenticator.
19 20 21 22 |
# File 'lib/ntlm/imap.rb', line 19 def initialize(user, domain, password) @user, @domain, @password = user, domain, password @state = 0 end |
Instance Method Details
#process(data) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/ntlm/imap.rb', line 24 def process(data) case (@state += 1) when 1 NTLM.negotiate.to_s when 2 NTLM.authenticate(data, @user, @domain, @password).to_s end end |