Hey all,
My goal is to manage the users’ access to my bot. The most reasonable method seems to be implementing a SocketIO connector with JWT authentication.
My sources are the following 2 links from the documentation:
Your Own Website
Rasa Open Source HTTP API
My 3 questions are:
- The request structure is different in both documentation pages I mentioned above. At Your Own Website, the token should be provided as a part of the JSON body:
{
"token": "jwt_encoded_payload"
}
While at Rasa Open Source HTTP API, the token should be provided as a part of the header:
"Authorization": "Bearer eyJhbG...VCJ9.eyJ"
"zdWIiOiI...gRG9lIi"
"wiaWF0I...CWjnDomO"
"Gl8e...cgRn-I"
And there’s also a notation for username and user role, which does not exist in the other source:
{
"user": {
"username": "<sender_id>",
"role": "user"
}
}
Which method is correct?
2. In credentials.yml, the following variables shall be defined: user_message_evt: user_uttered
, bot_message_evt: bot_uttered
. Are user_uttered
/ bot_uttered
built-in methods, or should be developed by me?
credentials.yml
socketio:
user_message_evt: user_uttered
bot_message_evt: bot_uttered
session_persistence: true
jwt_key: my_public_key
jwt_method: HS256
- If anybody has a complete working JWT-Authenticated SocketIO request structure and can share it, it will be great.
Thank you!