Lionel Cons > Net-STOMP-Client > Net::STOMP::Client::Auth

Download:
Net-STOMP-Client-2.2.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 2.2   Source  

NAME ^

Net::STOMP::Client::Auth - Authentication support for Net::STOMP::Client

SYNOPSIS ^

  use Net::STOMP::Client;
  $stomp = Net::STOMP::Client->new(
      uri  => "stomp://127.0.0.1:61613",
      auth => "plain name=system pass=manager",
  );

DESCRIPTION ^

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.

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.

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});

SEE ALSO ^

Authen::Credential, Net::STOMP::Client.

AUTHOR ^

Lionel Cons http://cern.ch/lionel.cons

Copyright (C) CERN 2010-2013

syntax highlighting: