Liblinphone 3.9.1中文--Modules--Managing authentication: userid and passwords

Managing authentication: userid and passwords 管理身份验证:用户ID和密码


           自定义类型

                  typedef struct _LinphoneAuthInfo LinphoneAuthInfo

      

    函数

           

LinphoneAuthInfo *  linphone_auth_info_new (const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm, const char *domain)
 
LinphoneAuthInfo *  linphone_auth_info_clone (const LinphoneAuthInfo*ai)
 
const char *  linphone_auth_info_get_username (constLinphoneAuthInfo *i)
 
const char *  linphone_auth_info_get_passwd (constLinphoneAuthInfo *i)
 
const char *  linphone_auth_info_get_userid (constLinphoneAuthInfo *i)
 
const char *  linphone_auth_info_get_realm (constLinphoneAuthInfo *i)
 
const char *  linphone_auth_info_get_domain (constLinphoneAuthInfo *i)
 
const char *  linphone_auth_info_get_ha1 (const LinphoneAuthInfo*i)
 
void  linphone_auth_info_set_passwd (LinphoneAuthInfo*info, const char *passwd)
 
void  linphone_auth_info_set_username (LinphoneAuthInfo*info, const char *username)
 
void  linphone_auth_info_set_userid (LinphoneAuthInfo*info, const char *userid)
 
void  linphone_auth_info_set_realm (LinphoneAuthInfo*info, const char *realm)
 
void  linphone_auth_info_set_domain (LinphoneAuthInfo*info, const char *domain)
 
void  linphone_auth_info_set_ha1 (LinphoneAuthInfo*info, const char *ha1)
 
void  linphone_auth_info_destroy (LinphoneAuthInfo *obj)
 
void  linphone_auth_info_write_config (LpConfig *config,LinphoneAuthInfo *obj, int pos)
 
LinphoneAuthInfo *  linphone_auth_info_new_from_config_file (LpConfig*config, int pos)
 
const LinphoneAuthInfo *  _linphone_core_find_auth_info (LinphoneCore *lc, const char *realm, const char *username, const char *domain, bool_t ignore_realm)
 
const LinphoneAuthInfo *  linphone_core_find_auth_info (LinphoneCore *lc, const char *realm, const char *username, const char *domain)
 
void  linphone_core_write_auth_info (LinphoneCore *lc,LinphoneAuthInfo *ai)
 
LinphoneAuthInfo *  linphone_core_create_auth_info (LinphoneCore *lc, const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm, const char *domain)
 
void  linphone_core_add_auth_info (LinphoneCore *lc, const LinphoneAuthInfo *info)
 
void  linphone_core_abort_authentication (LinphoneCore*lc, LinphoneAuthInfo *info)
 
void  linphone_core_remove_auth_info (LinphoneCore *lc, const LinphoneAuthInfo *info)
 
const bctbx_list_t *  linphone_core_get_auth_info_list (constLinphoneCore *lc)
 
void  linphone_core_clear_all_auth_info (LinphoneCore*lc)


详细说明

 


自定义类型文档

    typedef struct _LinphoneAuthInfo LinphoneAuthInfo

     包含身份验证信息的对象

      注意:

           这对象的字段不应该被直接访问.最好使用访问器方法

           大多数情况下,身份认证信息包括用户名和密码.有时,代理需要用户id,并且realm有利于区分不同的SIP域名.

           一旦创建和赋值,LinphoneAuthInfo必须被添加到LinphoneCore,为了在使用的时候可见并被自动调用.使用linphone_core_add_auth_info()实现.

           在应用程序需要的时候,LinphoneCore对象可以主动请求请求身份验证信息,通过LinphoneCoreVTable结构体的auth_info_requested回调函数来实现

           应用程序可以回复这个消息请求,在调用linphone_core_add_auth_info().这会接通所有等待的验证事务并用认证头重试他们.

        

函数文档

                LinphoneAuthInfo* linphone_auth_info_clone(const LinphoneAuthInfo* source)

        实例化一个新的LinphoneAuthInfo对象从source

        参数

               [in] source 被克隆的LinphoneAuthInfo对象

        返回

                新创建的LinphoneAuthonInfo对象

 


         void linphone_auth_info_destroy(LinphoneAuthInfo* obj)

         销毁一个LinphoneAuthInfo对象

 

         const char* linphone_auth_info_get_domain(const LinphoneAuthInfo* info) 

         获取domainc成员变量

         参数

                   [in] info LinphoneAuthInfo对象

         返回

                   domain



          const char* linphone_auth_info_get_ha1(const LinphoneAuthInfo* info)

          获取 ha1成员变量.

                           参数

                                                     ha1

          

          



          const char* linphone_auth_info_get_realm(const LinphoneAuthInfo* info)

          获取password成员变量

          参数

                     [in] info LinphoneAuthInfo对象

          返回

                     password成员变量



           const char* linphone_auth_info_get_realm(const LinphoneAuthInfo* info)

           获取realm成员变量

           参数

                   [in] info LinphoneAuthInfo对象

           返回

                    realm成员变量



            const char* linphone_auth_info_get_userid(const LinphoneAuthInfo* info)

            获取userid成员变量

            参数

                          [in] info LinphoneAuthInfo对象

            返回

                     userid成员变量



            const char* linphone_auth_info_get_username(const LinphoneAuthInfo* info)

            获取username成员变量

            参数

                           [in] info LinphoneAuthInfo对象

            返回

                    username成员变量



            LinphoneAuthInfo* linphone_auth_info_new(const char* username, 

                                                     const char* userid,

                                                     const char* passwd,

                                                     const char* ha1,

                                                     const char* realm,

                                                     const char* domain)

            创建一个LinphoneAuthInfo对象.这个对象可以是空的,所有的参数都设置被NULL.Username,userid,password,realm和domain可以以后再用特定的方法设置.最后,username和passwd(或者ha1)是必需的

          参数

                     username  用户名需要进行身份验证

                     userid    用于身份验证的用户id(如果你不知道是什么,用NULL)

                     passwd    明文密码

                     ha1       ha1加密过的密码,如果没有给出明文密码

                     realm     认证域名(可大于sip域名)不幸的是许多SIP服务器不使用这个参数

                     domain    关于这个身份验证信息的有效的SIP域名.如果他必须被限制为一个SIP域

          返回

              一个LinphoneAuthInfo对象.linphone_auth_info_destroy()必须被用来销毁它,当它不再需要时.LinphoneCore复制LinphoneAuthInfo通过linphone_core_add_auth_info().


        void linphone_auth_info_set_domain(LinphoneAuthInfo* info, const char* domain)

        为LinphoneAuthInfo对象设置domain成员变量

        参数

                   [in] LinphoneAuthInfo对象

                   [in] domain 这应该不是必要的,因为realm被提供唯一的和充分的.然而,许多SIO服务器不正确地设置realm,那么domain必须被用来区分多个同username的SIP账户





        void linphone_auth_info_set_ha1(LinphoneAuthInfo* info, const char* ha1)

        设置ha1成员变量

        参数

                [in] info LinphoneAuthInfo对象

                [in] ha1  ha1


         

         void linphone_auth_info_set_passwd(LinphoneAuthInfo* info, const char* passwd)

         设置password成员变量

          参数

                   [in] info LinphoneAuthInfo对象 

                   [in] passwd password


 

          void linphone_auth_info_set_realm(LinphoneAuthInfo* info, const char* realm)

          设置realm成员变量

          参数

                    [in] info LinphoneAuthInfo对象

                    [in] realm realm



           void linphone_auth_info_set_username(LinphoneAuthInfo* info, const char* username)

          设置username成员变量

          参数

                    [in] info LinphoneAuthInfo对象

                    [in] username username

        

          

            void linphone_core_abort_authtication(LinphoneCore* lc, LinphoneAuthInfo* info)

            这个方法被用来中止一个用户的身份验证请求(由LinphoneCore发起的 LinphoneCoreVTable的auth_info_requested回调函数)          



           void linphone_core_add_auth_info(LinphoneCore* lc, const LinphonAuthInfo* info)

           添加身份验证信息到LinphoneCore

           这个信息会被用于所有需要身份验证的SIP事务


 

            void linphone_core_clear_all_auth_info(LinphoneCore* lc)

            清除所有身份验证信息

            

            

            LinphoneAuthInfo* linphone_core_create_auth_info(LinphoneCore* lc,

                                                              const char*  username, 

                                                              const char*  userid,

                                                              const char*  passwd,

                                                              const char*  ha1,

                                                              const char*  realm,

                                                              const char*  domain)

           用LinphoneCore的默认值来创建一个身份验证信息对象

           参见

                     [in]  lc  LinphonCore对象

                     [in]  username  包含身份验证凭证username部分的字符串

                     [in]  userid    (可选)

                     [in]  passwd 包含身份验证凭证password的字符串(可选,password和ha1之间必须设置一个)

                     [in]  ha1 包含password的ha1哈希值的字符串(可选,password和ha1之间必须设置一个

                     [in]  realm  用于区分不同的SIP身份验证domain的字符串(可选)

                     [in] domain  有效的身份验证的SIP domain,如果它必须被限制为一个SIP domain.

           返回 

                    设置默认值的LinphoneAuthInfo



           

          const LinphoneAuthInfo* linphone_core_find_auth_info(Linphone* lc, const char* realm, const char* username, const char* sip_domain)

          找到与realm,username,domain匹配的身份验证信息.首先,(realm,username)对被搜索.如果多个结果(这应该不会发生因为realm是唯一的),然后domain被添加到搜索参数中.

          参数

                 lc    LinphoneCore对象

                real   身份验证信息的'realm'(可选)

             username  SIP username用于身份验证的(强制的)

                        sip_domain   SIP domain名字(可选)

          返回

                   一个 LinphoneAuthInfo对象



          const bctbx_list_t* linphone_core_get_auth_info_list(const LinphoneCore* lc)

          返回一个关于目前已登记的LinphoneAuthonInfo的不可变列表

          参数

                [in] lc LinphoneCore对象

          返回

                  LinphoneAuthInfo对象列表



           void linphone_core_remove_auth_info(LinphoneCore* lc, const LinphoneAuthInfo* info)

           删除一个身份验证信息对象





       

### 回答1: python-3.9.1-amd64.exe是Python编程语言的一个版本,于2020年12月7日发布。这是一个64位的可执行文件,可以在Windows操作系统上运行。Python是一种通用的高级编程语言,被广泛用于开发应用程序、网站和数据分析。Python-3.9.1-amd64.exe是Python编程语言的官方发布版本,包含了Python解释器和一些常用的标准库。通过安装这个可执行文件,用户可以在Windows系统上使用Python进行程序开发。 Python-3.9.1-amd64.exe安装包的下载和安装过程相对简单。用户可以从Python官方网站下载这个安装包,并按照提示完成安装。安装过程中,可以选择自定义安装选项,例如安装路径和添加系统路径。安装完成后,用户可以通过命令行或者集成开发环境(IDE)来运行Python程序。 Python-3.9.1-amd64.exe版本带来了许多新的功能和改进。例如,增加了对字节码直接下降为机器码的实验性支持,提高了某些场景下的性能;还引入了对时间的新类型模块zoneinfo的支持,用于更好地处理时区相关的操作;此外,还对异常链的语义进行了改变,使其在异常处理和报告中更加直观和有用。 总之,Python-3.9.1-amd64.exe是Python编程语言的一个稳定和可靠的版本,用于在64位Windows操作系统上进行Python程序开发。用户可以通过下载和安装这个可执行文件,体验到Python最新版本的特性和改进。无论是初学者还是有经验的开发者,Python都是一门易学且功能强大的编程语言,通过这个版本的安装包,我们可以轻松地进行Python开发。 ### 回答2: Python 3.9.1-amd64.exe是Python编程语言的安装文件。Python是一种高级编程语言,被广泛应用于软件开发、数据分析、人工智能等领域。Python 3.9.1-amd64.exe是适用于64位操作系统的安装程序。 通过运行Python 3.9.1-amd64.exe,可以将Python解释器和相关的开发环境安装到计算机上。Python解释器是一种可以执行Python代码的程序,它可以解释和执行Python语言编写的程序。安装Python后,我们可以使用Python语言编写程序,并通过解释器执行,从而实现各种功能。 Python 3.9.1-amd64.exe安装程序包含了Python解释器以及相关的标准库和工具。标准库是一组已经编写好的Python模块,提供了丰富的功能和方法,可以帮助我们快速开发程序。同时,还可以使用第三方库和模块来扩展Python的功能,例如科学计算、Web开发、数据可视化等领域。 安装Python 3.9.1-amd64.exe很简单,只需要双击运行安装程序,并按照提示完成安装。安装完成后,我们就可以在命令行或集成开发环境中调用Python解释器,并开始编写和执行Python程序了。 总结来说,Python 3.9.1-amd64.exe是一种用于安装Python 3.9.1版本的64位操作系统的安装程序。通过安装Python,我们可以使用Python语言编写程序,并利用Python解释器执行这些程序,开发各种应用和解决各种问题。 ### 回答3: python-3.9.1-amd64.exe是Python编程语言的一个版本。Python是一种高级编程语言,具有简单易学、可读性强等特点,广泛应用于各种领域的软件开发和数据分析。 Python 3.9.1是Python的一个主要版本,它带来了新的功能和改进。这个版本是在2020年12月发布的,它修复了早期版本中的一些漏洞和问题,并增加了一些新的特性和改进。其中,amd64表示该版本适用于64位的AMD架构处理器。 执行文件(.exe)表示这是一个可执行文件,它可以在Windows操作系统上直接运行。通过运行python-3.9.1-amd64.exe,用户可以安装Python 3.9.1版本到自己的计算机上。 安装Python 3.9.1后,用户可以使用Python编写和运行自己的程序。Python具有丰富的标准库和第三方库,可以用于开发各种类型的应用程序,包括Web开发、科学计算、机器学习和人工智能等。 这个版本带来了许多新的特性和改进,包括语言增强、性能优化、库更新等。同时,该版本也修复了一些早期版本中存在的问题,提高了Python的稳定性和可靠性。 总而言之,python-3.9.1-amd64.exe是Python编程语言的一个版本,用户可以通过运行它来安装Python 3.9.1版本,并使用Python开发各种类型的应用程序。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值