当前位置: 首页>>代码示例>>Python>>正文


Python TokenClass.splitPinPass方法代码示例

本文整理汇总了Python中linotp.lib.tokenclass.TokenClass.splitPinPass方法的典型用法代码示例。如果您正苦于以下问题:Python TokenClass.splitPinPass方法的具体用法?Python TokenClass.splitPinPass怎么用?Python TokenClass.splitPinPass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在linotp.lib.tokenclass.TokenClass的用法示例。


在下文中一共展示了TokenClass.splitPinPass方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: splitPinPass

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import splitPinPass [as 别名]
    def splitPinPass(self, passw):
        """
        Split the PIN and the OTP value.
        Only if it is locally checked and not remotely.

        :param passw: the password with pin and otp
        :return: tupple of the (success, pin and otpvalue)

        """
        local_check = self.check_pin_local()

        if local_check:
            (pin, otpval) = TokenClass.splitPinPass(self, passw)
        else:
            pin = ""
            otpval = passw

        log.debug("[splitPinPass] [remotetoken] returnung (len:%r) (len:%r)" % (len(pin), len(otpval)))
        return pin, otpval
开发者ID:rogerwangzy,项目名称:LinOTP,代码行数:21,代码来源:remotetoken.py

示例2: splitPinPass

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import splitPinPass [as 别名]
    def splitPinPass(self, passw):
        '''
        Split the PIN and the OTP value.
        Only if it is locally checked and not remotely.
        '''
        pin = ""
        otpval = ""

        local_check = self.check_pin_local()
        log.debug("[splitPinPass] [radiustoken] local checking pin? %r"
                  % local_check)

        if self.check_pin_local():
            log.debug("[splitPinPass] [radiustoken] locally checked")
            (pin, otpval) = TokenClass.splitPinPass(self, passw)
        else:
            log.debug("[splitPinPass] [radiustoken] remotely checked")
            pin = ""
            otpval = passw

        log.debug("[splitPinPass] [radiustoken] returning (len:%s) (len:%s)" % (len(pin), len(otpval)))
        return pin, otpval
开发者ID:hopil,项目名称:LinOTP,代码行数:24,代码来源:radiustoken.py


注:本文中的linotp.lib.tokenclass.TokenClass.splitPinPass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。