From 9f0f34a35a526e39f9520dea3f245b10dbf29dbe Mon Sep 17 00:00:00 2001 From: Sergii Gromovyi Date: Fri, 24 Apr 2020 14:16:54 +0300 Subject: [PATCH] Fix for refreshing open id metadata issue. See the description in https://github.com/microsoft/botbuilder-python/issues/990 --- .../botframework/connector/auth/jwt_token_extractor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/botframework-connector/botframework/connector/auth/jwt_token_extractor.py b/libraries/botframework-connector/botframework/connector/auth/jwt_token_extractor.py index 4a0850763..529ad00cb 100644 --- a/libraries/botframework-connector/botframework/connector/auth/jwt_token_extractor.py +++ b/libraries/botframework-connector/botframework/connector/auth/jwt_token_extractor.py @@ -126,7 +126,7 @@ def __init__(self, url): async def get(self, key_id: str): # If keys are more than 5 days old, refresh them - if self.last_updated < (datetime.now() + timedelta(days=5)): + if self.last_updated < (datetime.now() - timedelta(days=5)): await self._refresh() return self._find(key_id)