AnyEvent-RabbitMQ
view release on metacpan or search on metacpan
lib/AnyEvent/RabbitMQ.pm view on Meta::CPAN
$self->_push_read_and_valid(
'Connection::Start',
sub {
my $frame = shift;
my @mechanisms = split /\s/, $frame->method_frame->mechanisms;
return $args{on_failure}->('AMQPLAIN is not found in mechanisms')
if none {$_ eq 'AMQPLAIN'} @mechanisms;
my @locales = split /\s/, $frame->method_frame->locales;
return $args{on_failure}->('en_US is not found in locales')
if none {$_ eq 'en_US'} @locales;
$self->{_server_properties} = $frame->method_frame->server_properties;
$self->_push_write(
Net::AMQP::Protocol::Connection::StartOk->new(
client_properties => {
platform => 'Perl',
product => __PACKAGE__,
information => 'http://d.hatena.ne.jp/cooldaemon/',
version => Net::AMQP::Value::String->new(__PACKAGE__->VERSION),
lib/AnyEvent/RabbitMQ.pm view on Meta::CPAN
consumer_cancel_notify => Net::AMQP::Value::true,
exchange_exchange_bindings => Net::AMQP::Value::true,
},
%{ $args{client_properties} || {} },
},
mechanism => 'AMQPLAIN',
response => {
LOGIN => $args{user},
PASSWORD => $args{pass},
},
locale => 'en_US',
),
);
$self->_tune(%args,);
},
$args{on_failure},
);
return $self;
}
share/fixed_amqp0-8.xml view on Meta::CPAN
</field>
<field name="mechanisms" type="longstr">
available security mechanisms
<doc>
A list of the security mechanisms that the server supports, delimited
by spaces. Currently ASL supports these mechanisms: PLAIN.
</doc>
<see name="security mechanisms"/>
<assert check="notnull"/>
</field>
<field name="locales" type="longstr">
available message locales
<doc>
A list of the message locales that the server supports, delimited
by spaces. The locale defines the language in which the server
will send reply texts.
</doc>
<rule implement="MUST">
All servers MUST support at least the en_US locale.
</rule>
<assert check="notnull"/>
</field>
</method>
<method name="start-ok" synchronous="1" index="11">
select security mechanism and locale
<doc>
This method selects a SASL security mechanism. ASL uses SASL
(RFC2222) to negotiate authentication and encryption.
</doc>
<chassis name="server" implement="MUST"/>
<field name="client properties" domain="peer properties">
client properties
</field>
<field name="mechanism" type="shortstr">
selected security mechanism
share/fixed_amqp0-8.xml view on Meta::CPAN
<field name="response" type="longstr">
security response data
<doc>
A block of opaque data passed to the security mechanism. The contents
of this data are defined by the SASL security mechanism. For the
PLAIN security mechanism this is defined as a field table holding
two fields, LOGIN and PASSWORD.
</doc>
<assert check="notnull"/>
</field>
<field name="locale" type="shortstr">
selected message locale
<doc>
A single message local selected by the client, which must be one
of those specified by the server.
</doc>
<assert check="notnull"/>
</field>
</method>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<method name="secure" synchronous="1" index="20">
security mechanism challenge
share/fixed_amqp0-9-1.xml view on Meta::CPAN
</rule>
</field>
<field name = "mechanisms" domain = "longstr" label = "available security mechanisms">
<doc>
A list of the security mechanisms that the server supports, delimited by spaces.
</doc>
<assert check = "notnull" />
</field>
<field name = "locales" domain = "longstr" label = "available message locales">
<doc>
A list of the message locales that the server supports, delimited by spaces. The
locale defines the language in which the server will send reply texts.
</doc>
<rule name = "required-support">
<doc>
The server MUST support at least the en_US locale.
</doc>
<doc type = "scenario">
Client connects to server and inspects the locales field. It checks for
the presence of the required locale(s).
</doc>
</rule>
<assert check = "notnull" />
</field>
</method>
<method name = "start-ok" synchronous = "1" index = "11"
label = "select security mechanism and locale">
<doc>
This method selects a SASL security mechanism.
</doc>
<chassis name = "server" implement = "MUST" />
<field name = "client-properties" domain = "peer-properties" label = "client properties">
<rule name = "required-fields">
<!-- This rule is not testable from the client side -->
<doc>
share/fixed_amqp0-9-1.xml view on Meta::CPAN
</field>
<field name = "response" domain = "longstr" label = "security response data">
<doc>
A block of opaque data passed to the security mechanism. The contents of this
data are defined by the SASL security mechanism.
</doc>
<assert check = "notnull" />
</field>
<field name = "locale" domain = "shortstr" label = "selected message locale">
<doc>
A single message locale selected by the client, which must be one of those
specified by the server.
</doc>
<assert check = "notnull" />
</field>
</method>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<method name = "secure" synchronous = "1" index = "20" label = "security mechanism challenge">
<doc>
( run in 2.114 seconds using v1.01-cache-2.11-cpan-ceb78f64989 )