Class: Net::IMAP::LoginAuthenticator

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

Overview

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

Constant Summary collapse

STATE_USER =
:USER
STATE_PASSWORD =
:PASSWORD

Instance Method Summary collapse

Instance Method Details

#process(data) ⇒ Object



3131
3132
3133
3134
3135
3136
3137
3138
3139
# File 'lib/net/imap.rb', line 3131

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