本文整理汇总了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
示例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