Net::STOMP::Client::Auth - Authentication support for Net::STOMP::Client
use Net::STOMP::Client; $stomp = Net::STOMP::Client->new( uri => "stomp://127.0.0.1:61613", auth => "plain name=system pass=manager", );
This module handles STOMP authentication. It is used internally by Net::STOMP::Client and should not be directly used elsewhere.
If the optional Authen::Credential module is available, an additional auth attribute can be given to Net::STOMP::Client's new() method. If the module is not available, the auth attribute cannot be used.
auth
This attribute can take either a single authentication credential (either as a string or an Authen::Credential object) or multiple credentials (via an array reference). See Authen::Credential for more information about these credentials.
If an X.509 credential is given, it will be used at SSL connection time. If a plain credential is given, it will be used in the CONNECT frame. If needed, both types of credentials could be used for the same STOMP connection.
CONNECT
Using generic authentication credentials is very convenient as they could be passed as command line options to a script:
# default authentication $Option{auth} = "none"; # get URI & credential from command line GetOptions(\%Option, "auth=s", "uri=s", ... ); $stomp = Net::STOMP::Client->new(uri => $Option{uri}, auth => $Option{auth});
Authen::Credential, Net::STOMP::Client.
Lionel Cons http://cern.ch/lionel.cons
Copyright (C) CERN 2010-2013
To install Net::STOMP::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::STOMP::Client
CPAN shell
perl -MCPAN -e shell install Net::STOMP::Client
For more information on module installation, please visit the detailed CPAN module installation guide.