How to logon through bot for poc purpose - Getting Started with Rasa / Tutorials, Resources & Videos - Rasa Community Forum
👋 Introducing the Rasa Playground
How to logon through bot for poc purpose
post by surya1994 on Jul 21, 2019
Hi Our client ask us to develop a bot in which user can login through bot by using user name and password and also here password should not be visible to others while typing so i defined following function in actions.py for password masking but this function is not executing and goes to next action so can any one please let me know how can i take user name and password(masking) through bot with out depending on nlu data.
program for password masking written in actions.py:
import getpass
key = getpass.getpass('Password :: ')
After getting user name and password i have to make multiple api calls with lot of parameters taken from output of previous api so can you also please let me know how can i set multiple slots so that i can use them in next api call.
Note: This one is for POC purpose only so we are not considering security now
Thanks can any one please provide solution as fast as possible
post by JiteshGaikwad on Jul 21, 2019
Hey @surya1994, you can use FormActions for getting the user name & password and call the API once you have taken the user data and you can validate too.
post by surya1994 on Jul 21, 2019
Thanks @JiteshGaikwad i already tried that one but i am not able to know how can i do password masking in forms.If you have any idea can you please let me know
post by JiteshGaikwad on Jul 21, 2019
I don’t understand what do you mean by password marking?
post by surya1994 on Jul 21, 2019
sorry yar it is password masking(when ever user gives password it should not visible it should look like **********
post by surya1994 on Jul 21, 2019
If you have any idea about password masking can you please let me know
post by JiteshGaikwad on Jul 21, 2019
So you can do that in your front end I mean the Bot UI. Can I know which UI you are using?
post by surya1994 on Jul 21, 2019
Can we set multiple slots through single custom action…?
Example like this:
return [Slotset(“username”:user), Slotset(“password”:pass), Slotset(“registrationnumber”:regnum)]
Thanks
post by JiteshGaikwad on Jul 21, 2019
But you want to mask the password while user is typing right?
post by surya1994 on Jul 21, 2019
yes after taking user name and password i have to call another action in which i will do api call after that call i will have to take some output parameters from that call and give this out as input for next api call because of this i have to set multiple slots in action so that i can use them in further
if you have any idea how to do this please let me know
post by JiteshGaikwad on Jul 21, 2019
Hey @surya1994 what problem are you facing in using the FormAction?
post by surya1994 on Jul 21, 2019
when i am using Forms some times it is showing password as user intent and username as password intent so slots are not setting and directly goes to next action i am not able to understand how to solve this problem.
NLU data:
##intent:username
- af48289
- af76578
- a12345
- f567y7
##intent:password
- uf12345
- iu89076
- y90875
- t67890
- 87900j
##regex:user
- [A-Z][0-9]{6,10}
##regex:pass
- [A-Z][0-9]{6,10}
story:
utter_payment
affirm
user_login_form
slot{“user”:“af48289”}
utter_slots
this is just an example how my story look like
Here i will take both password and username in forms only
Thanks
post by JiteshGaikwad on Jul 21, 2019
Hey @surya1994 let me try out your usecase I will get back to you once I get some solution
post by surya1994 on Jul 21, 2019
Thanks @JiteshGaikwad
one small question can i set multiple slots in one custom action