Skip to content

Commit e5769a5

Browse files
committed
Rename obtain_token_with_username_password(...) to ...by...(...)
1 parent f11abec commit e5769a5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

oauth2cli/oauth2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def obtain_token_by_authorization_code(
299299
data["client_id"] = self.client_id
300300
return self._obtain_token("authorization_code", data=data, **kwargs)
301301

302-
def obtain_token_with_username_password(
302+
def obtain_token_by_username_password(
303303
self, username, password, scope=None, **kwargs):
304304
"""The Resource Owner Password Credentials Grant, used by legacy app."""
305305
data = kwargs.pop("data", {})

tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_client_credentials(self):
108108
@unittest.skipUnless(
109109
"username" in CONFIG and "password" in CONFIG, "username/password missing")
110110
def test_username_password(self):
111-
result = self.client.obtain_token_with_username_password(
111+
result = self.client.obtain_token_by_username_password(
112112
CONFIG["username"], CONFIG["password"],
113113
data={"resource": CONFIG.get("resource")}, # MSFT AAD V1 only
114114
scope=CONFIG.get("scope"))

0 commit comments

Comments
 (0)