Object
Base credentials encoder. Subclasses implement credentials encoding for a particular authentication mechanism (PLAIN, EXTERNAL, etc).
@api plugin
Registers an encoder for authentication mechanism @api plugin
# File lib/bunny/authentication/credentials_encoder.rb, line 34 def self.auth_mechanism(*mechanisms) mechanisms.each do |m| registry[m] = self end end
Instantiates a new encoder for the authentication mechanism used by the provided session.
@return [Bunny::CredentialsEncoder]
# File lib/bunny/authentication/credentials_encoder.rb, line 23 def self.for_session(session) registry[session.mechanism].new(session) end
Encodes provided credentials according to the specific authentication mechanism @return [String] Encoded credentials
# File lib/bunny/authentication/credentials_encoder.rb, line 43 def encode_credentials(username, challenge) raise NotImplementedError.new("Subclasses must override this method") end
Generated with the Darkfish Rdoc Generator 2.