Class Net::IMAP::LoginAuthenticator
In: lib/net/imap.rb
Parent: Object

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

Methods

new   process  

Constants

STATE_USER = :USER
STATE_PASSWORD = :PASSWORD

Public Class methods

[Source]

      # File lib/net/imap.rb, line 3179
3179:       def initialize(user, password)
3180:         @user = user
3181:         @password = password
3182:         @state = STATE_USER
3183:       end

Public Instance methods

[Source]

      # File lib/net/imap.rb, line 3164
3164:       def process(data)
3165:         case @state
3166:         when STATE_USER
3167:           @state = STATE_PASSWORD
3168:           return @user
3169:         when STATE_PASSWORD
3170:           return @password
3171:         end
3172:       end

[Validate]