问题
I have made a chat-bot in android in which i called google dialog-flow api. In google dialog-flow, I am calling an third part api. Now i want to implement user authentication in android app but not from google account. I want to authenticate users from the third party (the one i am connecting it to dialog-flow).
How to authenticate users?. Can i Dynamically Change the username-password in Fulfillment of dialog-flow or is there any API for it?
Note : I don't want to use google account to authenticate users.
Following is the Android code :
final AIConfiguration config = new AIConfiguration("9fweerwewrwr",
AIConfiguration.SupportedLanguages.English,
AIConfiguration.RecognitionEngine.System);
aiService = AIService.getService(this, config);
aiDataService = new AIDataService(this, config);
customAIServiceContext =
AIServiceContextBuilder.buildFromSessionId(uuid);
aiRequest = new AIRequest();
aiService.setListener(this);
So here I am connecting android app to dialog-flow and from dialog-flow I am putting url, user name and password in fulfillment for third party connection (Where the javascript is used to detect intents and perform function). so in short in fulfillment i am calling an post api. which will send request from dialog-flow to the third party.
Thank you in Advance.
来源:https://stackoverflow.com/questions/58932271/user-authentication-in-dailogflow-through-third-party