8000 Fix call to auth endpoint · zigri2612/botbuilder-python@02e326c · GitHub
[go: up one dir, main page]

Skip to content

Commit 02e326c

Browse files
committed
Fix call to auth endpoint
1 parent 661b9cf commit 02e326c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libraries/botframework-connector/botframework/connector/auth/microsoft_app_credentials.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from datetime import datetime, timedelta
22
from urllib.parse import urlparse
3-
43
from msrest.authentication import (
54
BasicTokenAuthentication,
65
Authentication)
@@ -111,7 +110,6 @@ async def get_access_token(self, force_refresh: bool=False) -> str:
111110
return oauth_token.access_token
112111
else:
113112
return ''
114-
115113
async def refresh_token(self) -> _OAuthResponse:
116114
"""
117115
returns: _OAuthResponse
@@ -122,7 +120,7 @@ async def refresh_token(self) -> _OAuthResponse:
122120
'client_secret': self.microsoft_app_password,
123121
'scope': MicrosoftAppCredentials.refreshScope}
124122
async with aiohttp.ClientSession() as session:
125-
async with session.post(self.oauth_endpoint, data=options) as response:
123+
async with session.post(self.oauth_endpoint, data=aiohttp.FormData(options)) as response:
126124
response.raise_for_status()
127125
oauth_response = _OAuthResponse.from_json(await response.json())
128126
oauth_response.expiration_time = datetime.now() + \

0 commit comments

Comments
 (0)
0