W3cubDocs

/Ruby 2.5

class Net::IMAP::LoginAuthenticator

Parent:
Object

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

Constants

STATE_PASSWORD
STATE_USER

Public Class Methods

new(user, password) Show source
# File lib/net/imap.rb, line 3513
def initialize(user, password)
  @user = user
  @password = password
  @state = STATE_USER
end

Public Instance Methods

process(data) Show source
# File lib/net/imap.rb, line 3498
def process(data)
  case @state
  when STATE_USER
    @state = STATE_PASSWORD
    return @user
  when STATE_PASSWORD
    return @password
  end
end

Ruby Core © 1993–2017 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.