Class: AMQ::Client::Async::AuthMechanismAdapter::Plain
- Inherits:
-
AMQ::Client::Async::AuthMechanismAdapter
- Object
- AMQ::Client::Async::AuthMechanismAdapter
- AMQ::Client::Async::AuthMechanismAdapter::Plain
- Defined in:
- lib/amq/client/async/auth_mechanism_adapter/plain.rb
Overview
Manages the encoding of credentials for the PLAIN authentication mechanism.
Instance Attribute Summary
Attributes inherited from AMQ::Client::Async::AuthMechanismAdapter
Instance Method Summary collapse
-
#encode_credentials(username, password) ⇒ String
Encodes credentials for the given username and password.
Methods inherited from AMQ::Client::Async::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/amq/client/async/auth_mechanism_adapter/plain.rb', line 20 def encode_credentials(username, password) "\0#{username}\0#{password}" end |