8000 fixing bug in jwt token extrator (#475) · guptarohan41/botbuilder-python@dfaf3e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit dfaf3e8

Browse files
Virtual-Joshaxelsrz
authored andcommitted
fixing bug in jwt token extrator (microsoft#475)
* fixing bug in jwt token extrator * adding fix for credentials
1 parent e189211 commit dfaf3e8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

libraries/botbuilder-core/botbuilder/core/bot_framework_adapter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,8 @@ async def create_connector_client(
653653
credentials.oauth_scope = (
654654
GovernmentConstants.TO_CHANNEL_FROM_BOT_OAUTH_SCOPE
655655
)
656+
else:
657+
credentials = self._credentials
656658
else:
657659
credentials = self._credentials
658660

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ async def _refresh(self):
142142
def _find(self, key_id: str):
143143
if not self.keys:
144144
return None
145-
key = next(x for x in self.keys if x["kid"] == key_id)
145+
key = [x for x in self.keys if x["kid"] == key_id][0]
146146
public_key = RSAAlgorithm.from_jwk(json.dumps(key))
147147
endorsements = key.get("endorsements", [])
148148
return _OpenIdConfig(public_key, endorsements)

0 commit comments

Comments
 (0)
0