[rabbitmq-discuss] How to specify user/pass
    Ask Solem 
    ask at rabbitmq.com
       
    Tue Jul  3 11:05:06 BST 2012
    
    
  
On 2 Jul 2012, at 05:45, eleanor wrote:
> Hi,
> 
> is there a tutorial somewhere which specifies how we can login to the
> rabbitmq which uses internal database and LDAP database. 
> 
> The example from the tutorial is the following code:
> 
> 
> How can I change that to also login with the user/pass to the rabbitmq. A
> link to the tutorial would be great. Sorry for the noob question, but I'm
> really just starting out with rabbitmq.
> 
The ConnectionParameters takes a credentials argument:
   credentials = pika.PlainCredentials('username', 'password')
   connection = pika.BlockingConnection(pika.ConnectionParameters(
        credentials=credentials,
        host='localhost')
I believe it's also possible use SSL, you can see the documentation
for more information:
http://pika.github.com/connecting.html#credentials
    
    
More information about the rabbitmq-discuss
mailing list