class Qpid::Proton::SASL
The SASL layer is responsible for establishing an authenticated and/or encrypted tunnel over which AMQP frames are passed between peers.
The peer acting as the SASL client must provide authentication credentials.
The peer acting as the SASL server must provide authentication against the received credentials.
@example
# SCENARIO: the remote endpoint has not initialized their connection # then the local endpoint, acting as a SASL server, decides # to allow an anonymous connection. # # The SASL layer locally assumes the role of server and then # enables anonymous authentication for the remote endpoint. # sasl = @transport.sasl sasl.server sasl.mechanisms("ANONYMOUS") sasl.done(Qpid::Proton::SASL::OK)
Constants
- AUTH
Authentication failed due to bad credentials.
- NONE
Negotation has not completed.
- OK
Authentication succeeded.
Public Class Methods
Public Instance Methods
done(outcome)
click to toggle source
Set the condition of the SASL negotiation.
@param outcome [Fixnum] The outcome.
# File lib/core/sasl.rb, line 88 def done(outcome) Cproton.pn_sasl_done(@impl, outcome) end
mechanisms(mechanisms)
click to toggle source
outcome()
click to toggle source
Returns the outcome of the SASL negotiation.
@return [Fixnum] The outcome.
# File lib/core/sasl.rb, line 78 def outcome outcome = Cprotn.pn_sasl_outcome(@impl) return nil if outcome == NONE outcome end