Control access to a skill
Guards are used to control access to a skill. We can block the reading of the skill according to one condition! This is very useful for an authentication system. Here is the JS code:
Add the `canActivated
property with children's skills to control access.
Here is the conversational script in ./skills/not-authorized/not-authorized.converse
Put a function with the @Event('canActivate')
decorator. This function will be executed as a priority. If the function returns true
, the skill scenario will continue. Otherwise, if the function returns false
then the user will not go further in the scenario
Last updated