Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TokenProviders #107

Closed
skinkie opened this issue Aug 26, 2013 · 5 comments
Closed

TokenProviders #107

skinkie opened this issue Aug 26, 2013 · 5 comments
Labels
feature-request This issue requires a new behavior in the product in order be resolved. Service Attention Workflow: This issue is responsible by Azure service team. Service Bus

Comments

@skinkie
Copy link

skinkie commented Aug 26, 2013

In the current Python code I cannot find any interface to specify a TokenProvider similar to the C# SDK. When can this be expected?

http://msdn.microsoft.com/en-us/library/microsoft.servicebus.tokenprovider.aspx

We would like to have this code working using the Python API.

MessagingFactory listenMF = MessagingFactory.Create(endpoints, new StaticSASTokenProvider(subscriptionToken));
SubscriptionClient sc = listenMF.CreateSubscriptionClient(topicPath, subscriptionName);
@huguesv
Copy link
Contributor

huguesv commented Aug 27, 2013

We'll need to investigate. I had no knowledge of this functionality, therefore there was no plan on adding it.

@skinkie
Copy link
Author

skinkie commented Aug 27, 2013

That is the main point, there is absolutely 0% documentation on this feature given that the C# code is closed source.

@twanwv
Copy link

twanwv commented Jul 4, 2014

Are there any plans for this to be implemented? For servicebus features this is kind of a big thing afaik.

@lmazuel
Copy link
Member

lmazuel commented Aug 11, 2016

There is an interface you can use to provide the signature to the request, which is close to the behavior asked here. The class must provide an implementation of the sign_request method:

class ServiceBusCustomAuthentication:
    def sign_request(self, request, httpclient):
        # Example when adding an header, but you can do anything you want with the request
        request.headers.append(
            ('Authorization', 'my sensitive authentication string')
        )

Then, create the ServiceBusService using an instance of this class:

client = ServiceBusService(authentication=ServiceBusCustomAuthentication())

ACS implementation
SAS implementation

Please tell me if you think this does not answer the question.
Thank you,

@lmazuel
Copy link
Member

lmazuel commented Aug 18, 2016

Close this one due to inactivity. Please feel free to open a new issue or re-comment here if you think my latest comment does not response to the bug.
Thanks!

@lmazuel lmazuel closed this as completed Aug 18, 2016
@bsiegel bsiegel added the Service Attention Workflow: This issue is responsible by Azure service team. label Sep 26, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request This issue requires a new behavior in the product in order be resolved. Service Attention Workflow: This issue is responsible by Azure service team. Service Bus
Projects
None yet
Development

No branches or pull requests

5 participants