123456789_123456789_123456789_123456789_123456789_

Class: Net::IMAP::LoginAuthenticator

Relationships & Source Files
Inherits: Object
Defined in: lib/net/imap.rb

Overview

Authenticator for the “LOGIN” authentication type. See #authenticate().

Constant Summary

Class Method Summary

Instance Method Summary

Constructor Details

.new(user, password) ⇒ LoginAuthenticator (private)

[ GitHub ]

  
# File 'lib/net/imap.rb', line 3445

def initialize(user, password)
  @user = user
  @password = password
  @state = STATE_USER
end

Instance Method Details

#process(data)

[ GitHub ]

  
# File 'lib/net/imap.rb', line 3430

def process(data)
  case @state
  when STATE_USER
    @state = STATE_PASSWORD
    return @user
  when STATE_PASSWORD
    return @password
  end
end