我在android中创建了一个聊天机器人,在其中我将其称为google dialog-flow api。在Google对话框流中,我正在调用第三方API。现在,我想在android应用中实现用户身份验证,而不是从google帐户中实现。我想验证来自第三方的用户(我正在将其连接到dialog-flow)。
如何验证用户身份?我可以在实现对话框流程中动态更改用户名密码吗?是否有任何API?
注意:我不想使用Google帐户来验证用户身份。
以下是Android代码:
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);
因此,在这里,我将android应用程序连接到dialog-flow,并从dialog-flow中输入用于实现第三方连接的url,用户名和密码(其中javascript用于检测意图和执行功能)。简而言之,为了实现目标,我称其为发布API。它将请求从对话框流发送到第三方。
先谢谢您