8000 Throw if is_skill_claim and claims_validator is null (#1375) · microsoft/botbuilder-python@159901f · GitHub 8000
[go: up one dir, main page]

Skip to content

Commit 159901f

Browse files
authored
Throw if is_skill_claim and claims_validator is null (#1375)
* Throw if is_skill_claim and claims_validator is null * Update jwt_token_validation.py
1 parent c1e98de commit 159901f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ async def validate_claims(
165165
):
166166
if auth_config and auth_config.claims_validator:
167167
await auth_config.claims_validator(claims)
168+
elif SkillValidation.is_skill_claim(claims):
169+
# Skill claims must be validated using AuthenticationConfiguration claims_validator
170+
raise PermissionError("Unauthorized Access. Request is not authorized. Skill Claims require validation.")
168171

169172
@staticmethod
170173
def is_government(channel_service: str) -> bool:

0 commit comments

Comments
 (0)
0