File tree Expand file tree Collapse file tree 7 files changed +9
-8
lines changed
botframework/connector/auth Expand file tree Collapse file tree 7 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ botframework-connector==4.15.0
33botbuilder-schema == 4.15.0
44botframework-streaming == 4.15.0
55requests == 2.27.1
6- PyJWT == 1.5.3
6+ PyJWT == 2.4.0
77cryptography == 3.3.2
88aiounittest == 1.3.0
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ botframework-connector==4.15.0
33botbuilder-schema == 4.15.0
44botbuilder-core == 4.15.0
55requests == 2.27.1
6- PyJWT == 1.5.3
6+ PyJWT == 2.4.0
77cryptography == 3.3.2
88aiounittest == 1.3.0
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11msrest == 0.6.*
22botbuilder-schema == 4.15.0
33requests == 2.27.1
4- PyJWT == 1.5.3
4+ PyJWT == 2.4.0
55cryptography == 3.3.2
66msal == 1.*
Original file line number Diff line number Diff line change 88VERSION = os .environ ["packageVersion" ] if "packageVersion" in os .environ else "4.15.0"
99REQUIRES = [
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]
You can’t perform that action at this time.
0 commit comments