Class: AMQP::AuthMechanismAdapter::Plain
- Inherits:
-
AMQP::AuthMechanismAdapter
- Object
- AMQP::AuthMechanismAdapter
- AMQP::AuthMechanismAdapter::Plain
- Defined in:
- lib/amqp/auth_mechanism_adapter/plain.rb
Overview
Manages the encoding of credentials for the PLAIN authentication mechanism.
Instance Attribute Summary
Attributes inherited from AMQP::AuthMechanismAdapter
Instance Method Summary collapse
-
#encode_credentials(username, password) ⇒ String
Encodes credentials for the given username and password.
Methods inherited from AMQP::AuthMechanismAdapter
Instance Method Details
#encode_credentials(username, password) ⇒ String
Encodes credentials for the given username and password. This involves sending the password across the wire in plaintext, so PLAIN authentication should only be used over a secure transport layer.
20 21 22 |
# File 'lib/amqp/auth_mechanism_adapter/plain.rb', line 20 def encode_credentials(username, password) "\0#{username}\0#{password}" end |