class 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
Public Class Methods
Source
# File lib/sasl/base.rb, line 94 def initialize(mechanism, preferences) @mechanism = mechanism @preferences = preferences @state = nil end
Public Instance Methods
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