601 B
601 B
HowTo: Block all Skill Claims
Write a function that conforms to the ValidateClaims
interface and throws an exception if the claims are skill claims:
const skillClaimsValidator = async (claims) => {
if (SkillValidation.isSkillClaim(claims)) {
throw new Error("Invalid call from a skill.");
}
}
Update BotFrameworkAdapter
instantiation, to pass the AuthenticationConfiguration
constructor the function defined above:
const adapter = new BotFrameworkAdapter({
...
authConfig: new AuthenticationConfiguration([], skillClaimsValidator),
});