-
Notifications
You must be signed in to change notification settings - Fork 37
Implement authentication for usernames/passwords using adal #3
Conversation
def __init__(self, username, password, **kwargs): | ||
super(AdalUserPassCredentials, self).__init__(**kwargs) | ||
self.username = username | ||
self.password = password |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implies that credentials are not tested at the instance creation, but at the instance usage. This is different from current UserPassCredentials
behavior.
I think we might want to keep the current behavior, but I'm open to discussion (@annatisch)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
||
"""Base class for adal-derived authentication.""" | ||
|
||
def __init__(self, client_id="04b07795-8ddb-461a-bbee-02f9e1bf7b46", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to have this id in a constant XPLAT_APP_ID
since it's not recommend anymore to use it:
https://github.com/AzureAD/azure-activedirectory-library-for-python#about-client_id-and-resource-arguments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Hi @brettcannon, @lmazuel The changes look good. In order to integrate the refresh token functionality we would need to use an oauth-requestslib Session as opposed to a standard requests Session. Alternatively, maybe ADAL has refresh token handling built in - and we can access it be doing a token acquisition at the time of creating the Session? I'm not sure - I'll take a look at ADAL. |
Close since integrated in #8 |
Nope, closing was the right thing to do. |
No description provided.