Azure / amqpnetlite

AMQP 1.0 .NET Library
Apache License 2.0
401 stars 143 forks source link

How do I authenticate to add a message to a queue #451

Closed scott-david-walker closed 3 years ago

scott-david-walker commented 3 years ago

I have a Service Bus with a queue that has a shared access policy. How can authenticate via this method?

Apologies if this is obvious but I couldn't see it in the docs :-)

xinchen10 commented 3 years ago

You have two options. Use the key name and key as user name and password when establishing a connection. Or use CBS to put a token before opening a link. There is a sample in the source code showing the CBS approach.