8000 PyJWT udpated by sdawodu (#1973) · anesh/botbuilder-python@edbe3b1 · GitHub
[go: up one dir, main page]

Skip to content

Commit edbe3b1

Browse files
tracyboehrerTracy Boehrer
and
Tracy Boehrer
authored
PyJWT udpated by sdawodu (microsoft#1973)
* PyJWT udpated by sdawodu * 'black' formatting Co-authored-by: Tracy Boehrer <trboehre@microsoft.com>
1 parent 7543a2c commit edbe3b1

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

libraries/botbuilder-core/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ botframework-connector==4.15.0
33
botbuilder-schema==4.15.0
44
botframework-streaming==4.15.0
55
requests==2.27.1
6-
PyJWT==1.5.3
6+
PyJWT==2.4.0
77
cryptography==3.3.2
88
aiounittest==1.3.0

libraries/botbuilder-dialogs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ botframework-connector==4.15.0
33
botbuilder-schema==4.15.0
44
botbuilder-core==4.15.0
55
requests==2.27.1
6-
PyJWT==1.5.3
6+
PyJWT==2.4.0
77
cryptography==3.3.2
88
aiounittest==1.3.0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def is_token_from_emulator(auth_header: str) -> bool:
6363
bearer_token = auth_header.split(" ")[1]
6464

6565
# Parse the Big Long String into an actual token.
66-
token = jwt.decode(bearer_token, verify=False)
66+
token = jwt.decode(bearer_token, options={"verify_signature": False})
6767
if not token:
6868
return False
6969

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async def get_identity(
6868
raise error
6969

7070
def _has_allowed_issuer(self, jwt_token: str) -> bool:
71-
decoded = jwt.decode(jwt_token, verify=False)
71+
decoded = jwt.decode(jwt_token, options={"verify_signature": False})
7272
issuer = decoded.get("iss", None)
7373
if issuer in self.validation_parameters.issuer:
7474
return True
@@ -111,6 +111,7 @@ async def _validate_token(
111111
metadata.public_key,
112112
leeway=self.validation_parameters.clock_tolerance,
113113
options=options,
114+
algorithms=["RS256"],
114115
)
115116

116117
claims = ClaimsIdentity(decoded_payload, True)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def is_skill_token(auth_header: str) -> bool:
5555
bearer_token = auth_header.split(" ")[1]
5656

5757
# Parse the Big Long String into an actual token.
58-
token = jwt.decode(bearer_token, verify=False)
58+
token = jwt.decode(bearer_token, options={"verify_signature": False})
5959
return SkillValidation.is_skill_claim(token)
6060

6161
@staticmethod
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
msrest==0.6.*
22
botbuilder-schema==4.15.0
33
requests==2.27.1
4-
PyJWT==1.5.3
4+
PyJWT==2.4.0
55
cryptography==3.3.2
66
msal==1.*

libraries/botframework-connector/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
VERSION = os.environ["packageVersion"] if "packageVersion" in os.environ else "4.15.0"
99
REQUIRES = [
1010
"msrest==0.6.*",
11-
"requests>=2.23.0,<2.26",
12-
"PyJWT>=1.5.3,<2.0.0",
11+
# "requests>=2.23.0,<2.26",
12+
"PyJWT>=2.4.0",
1313
"botbuilder-schema==4.15.0",
1414
"msal==1.*",
1515
]

0 commit comments

Comments
 (0)
0