In Files

Parent

SASL::Mechanism

Common functions for mechanisms

Mechanisms implement handling of methods start and receive. They return: [message_name, content] or nil where message_name is either ‘auth’ or ‘response’ and content is either a string which may transmitted encoded as Base64 or nil.

Attributes

mechanism[R]
preferences[R]

Public Class Methods

new(mechanism, preferences) click to toggle source
# File lib/sasl/base.rb, line 94
def initialize(mechanism, preferences)
  @mechanism = mechanism
  @preferences = preferences
  @state = nil
end

Public Instance Methods

failure?() click to toggle source
# File lib/sasl/base.rb, line 103
def failure?
  @state == :failure
end
receive(message_name, content) click to toggle source
# File lib/sasl/base.rb, line 112
def receive(message_name, content)
  case message_name
  when 'success'
    @state = :success
  when 'failure'
    @state = :failure
  end
  nil
end
start() click to toggle source
# File lib/sasl/base.rb, line 107
def start
  raise AbstractMethod
end
success?() click to toggle source
# File lib/sasl/base.rb, line 100
def success?
  @state == :success
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.