fxlwpy2000 2018-03-30 03:28 采纳率: 0%
浏览 3998
已结题

jitsi meet源码中,在登录界面提交登录信息的代码处理

登录jitsimeet,在登录界面填写用户名和密码后,压下OK键,进入jitsimeet。
如下代码为压下OK按键的代码:

    _onLogin() {
        const { _conference: conference, dispatch } = this.props;
        const { password, username } = this.state;
        const jid = toJid(username, this.props._configHosts);
        let r;

        // If there's a conference it means that the connection has succeeded,
        // but authentication is required in order to join the room.
        if (conference) {
            r = dispatch(authenticateAndUpgradeRole(jid, password, conference));
        } else {
            r = dispatch(connect(jid, password));
        }

        return r;
    }
    
<pre>
    export function authenticateAndUpgradeRole(
    id: string,
    password: string,
    conference: Object) {
return (dispatch: Dispatch, getState: Function) => {
    const { password: roomPassword }
        = getState()['features/base/conference'];
    const process
        = conference.authenticateAndUpgradeRole({
            id,
            password,
            roomPassword,

            onLoginSuccessful() {
                // When the login succeeds, the process has completed half
                // of its job (i.e. 0.5).
                return dispatch(_upgradeRoleFinished(process, 0.5));
            }
        });

    dispatch(_upgradeRoleStarted(process));
    process.then(
        /* onFulfilled */ () => dispatch(_upgradeRoleFinished(process, 1)),
        /* onRejected */ error => {
            // The lack of an error signals a cancellation.
            if (error.authenticationError || error.connectionError) {
                logger.error('authenticateAndUpgradeRole failed', error);
            }

            dispatch(_upgradeRoleFinished(process, error));
        });

    return process;
};

}


在authenticateAndUpgradeRole函数中,如下代码段

        const process
            = conference.authenticateAndUpgradeRole({
                id,
                password,
                roomPassword,

                onLoginSuccessful() {
                    // When the login succeeds, the process has completed half
                    // of its job (i.e. 0.5).
                    return dispatch(_upgradeRoleFinished(process, 0.5));
                }
            });
    

其中的conference.authenticateAndUpgradeRole应该实现的是用户名和密码的验证功能,但是我在源码工程中没有找到该接口的定义,请大神指教上述代码段的功能,以及如何能够找到提交登录信息后,是如何验证用户名和密码的?

  • 写回答

1条回答 默认 最新

  • dabocaiqq 2018-04-11 14:34
    关注
    评论

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型