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

Support for non-PAT authentication types #14

Open
natemcfeters opened this issue Dec 24, 2022 · 8 comments
Open

Support for non-PAT authentication types #14

natemcfeters opened this issue Dec 24, 2022 · 8 comments

Comments

@natemcfeters
Copy link

Would be nice to extend this to use msal for additional authentication types, like device flow.

@dalemyers
Copy link
Collaborator

Yeah, it's something that would be nice since it would open up a bunch of extra APIs, but isn't something in scope for any of the normal maintainers for now. Feel free to open a PR though!

@natemcfeters
Copy link
Author

Ok, let me see what I can do... I've effectively already done the same for when I was poking around with the python-azure-devops-api. Honestly, simple_ado seems much more approachable than the original, would love to extend this some and make it a bit more supported.

@natemcfeters
Copy link
Author

Hey @dalemyers I put a little work into this one and have this to show for it: https://github.com/microsoft/simple_ado/compare/main...natemcfeters:simple_ado:device_flow. It's a little hacky as I'm just adding the headers by hand, but it does work in limited testing. The azure-devops api for python makes use of msrest so it's more integrated in, but if this works for you I think it should satisfy and fixes it for me.

@dalemyers
Copy link
Collaborator

Can you open this as PR please?

@natemcfeters
Copy link
Author

Yep, although before I do... I noticed from your PR back to me that you wanted me to mark type of passed in values. In this case, because the auth is handled a bit differently, you'll either get passed a tuple or a dict. I've just currently marked it as None, but based on your feedback on the other issue, I assume you want this marked as well. Should I mark it simply as Object? Is there a way to mark it as either tuple or dict?

@dalemyers
Copy link
Collaborator

You can use Union[Tuple[...], Dict[...,...]]

@natemcfeters
Copy link
Author

I issued the pull request before I saw this on accident. I can make that change if you want to push back.

@natemcfeters
Copy link
Author

Hey @dalemyers please see the updated commit to the pull request. There was a lot of issues you brought up and I believe I've handled them all, or commented back on those I couldn't now. Can you review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants