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


Python TokenClass.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
    def __init__(self, a_token):
        '''
        constructor - create a token object

        :param aToken: instance of the orm db object
        :type aToken:  orm object

        '''
        log.debug("[init]  begin. Create a token object with: a_token %r" % (a_token))

        TokenClass.__init__(self, a_token)
        self.setType(u"HMAC")
        self.hKeyRequired = True

        # we support various hashlib methods, but only on create
        # which is effectively set in the update

        self.hashlibStr = u"sha1"
        try:
            self.hashlibStr = getFromConfig("hotp.hashlib", u'sha1')
        except Exception as ex:
            log.error('[init] Failed to get the hotp.hashlib (%r)' % (ex))
            raise Exception(ex)


        log.debug("[init]  end. Token object created")
        return
开发者ID:alexxtasi,项目名称:LinOTP,代码行数:29,代码来源:hmactoken.py

示例2: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
    def __init__(self, a_token, context=None):
        '''
        constructor - create a token object

        :param a_token: instance of the orm db object
        :type a_token:  orm object
        '''
        log.debug("[__init__] begin. entering constructor with param: a_token %r" % (a_token))
        TokenClass.__init__(self, a_token, context=context)
        self.setType(u"mOTP")

        return
开发者ID:choth02,项目名称:LinOTP,代码行数:14,代码来源:motptoken.py

示例3: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
    def __init__(self, aToken):
        """
        constructor - create a token class object with it's db token binding

        :param aToken: the db bound token
        """
        TokenClass.__init__(self, aToken)
        self.setType(u"forward")

        self.forwardSerial = None
        self.mode = ['authenticate', 'challenge']

        self.targetToken = None
        self.target_otp_count = -1
开发者ID:gsnbng,项目名称:LinOTP,代码行数:16,代码来源:forwardtoken.py

示例4: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
    def __init__(self, aToken):
        """
        constructor - create a token object

        :param aToken: instance of the orm db object
        :type aToken:  orm object

        """
        log.debug("Create a token object with: aToken %r", (aToken))

        TokenClass.__init__(self, aToken)
        self.setType(u"u2f")
        self.mode = ['challenge']  # This is a challenge response token

        log.debug("Token object created")
开发者ID:eespinosa,项目名称:Elm,代码行数:17,代码来源:u2ftoken.py

示例5: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
    def __init__(self, aToken):
        '''
        getInfo - return the status of the token rollout

        :return: info of the ocra token state
        :rtype: dict
        '''
        log.debug('[__init__]')

        TokenClass.__init__(self, aToken)
        self.setType(u"ocra2")
        self.transId = 0

        self.mode = ['challenge']
        log.debug('[__init__]:')
        return
开发者ID:alexxtasi,项目名称:LinOTP,代码行数:18,代码来源:ocra2token.py

示例6: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
    def __init__(self, aToken):
        """
        constructor - create a token class object with it's db token binding

        :param aToken: the db bound token
        """
        TokenClass.__init__(self, aToken)
        self.setType(u"remote")

        self.remoteServer = ""
        self.remoteLocalCheckpin = None
        self.remoteSerial = None
        self.remoteUser = None
        self.remoteRealm = None
        self.remoteResConf = None
        self.mode = ['authenticate', 'challenge']
开发者ID:eespinosa,项目名称:Elm,代码行数:18,代码来源:remotetoken.py

示例7: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
    def __init__(self, aToken, context=None):
        """
        constructor - create a token class object with it's db token binding

        :param aToken: the db bound token
        """
        TokenClass.__init__(self, aToken, context=context)
        self.setType(u"remote")

        self.remoteServer = ""
        self.remoteLocalCheckpin = None
        self.remoteSerial = None
        self.remoteUser = None
        self.remoteRealm = None
        self.remoteResConf = None
        self.mode = ["authenticate", "challenge"]

        self.isRemoteChallengeRequest = False
        self.local_pin_check = None
开发者ID:rogerwangzy,项目名称:LinOTP,代码行数:21,代码来源:remotetoken.py

示例8: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
    def __init__(self, aToken, context=None):
        '''
        constructor - create a token object

        :param aToken: instance of the orm db object
        :type aToken:  orm object

        '''
        log.debug("[init]  begin. Create a token object with: a_token %r" % (aToken))

        TokenClass.__init__(self, aToken, context=context)
        self.setType(u"TOTP")
        self.hKeyRequired = True

        ''' timeStep defines the granularity: '''
        self.timeStep = getFromConfig("totp.timeStep", 30)

        ''' window size in seconds:
            30 seconds with as step width of 30 seconds results
            in a window of 1  which is one attempt
        '''
        self.timeWindow = getFromConfig("totp.timeWindow", 180)


        '''the time shift is specified in seconds  - and could be
        positive and negative
        '''
        self.timeShift = getFromConfig("totp.timeShift", 0)

        '''we support various hashlib methods, but only on create
        which is effectively set in the update
        '''
        self.hashlibStr = getFromConfig("totp.hashlib", u'sha1')

        log.debug("[init]  end. Token object created")
        return
开发者ID:choth02,项目名称:LinOTP,代码行数:38,代码来源:totptoken.py

示例9: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
 def __init__ (self, token_model_object):
     TokenClass.__init__(self, token_model_object)
     self.setType(u'qr')
     self.mode = ['challenge']
开发者ID:kuffz,项目名称:LinOTP,代码行数:6,代码来源:qrtoken.py

示例10: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
    def __init__(self, aToken, context=None):
        TokenClass.__init__(self, aToken, context=context)
        self.setType(u"yubico")

        self.tokenid = ""
开发者ID:rogerwangzy,项目名称:LinOTP,代码行数:7,代码来源:yubicotoken.py

示例11: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
 def __init__(self, aToken, context=None):
     TokenClass.__init__(self, aToken, context=context)
     self.setType(u"spass")
     self.mode = ["authenticate"]
开发者ID:rogerwangzy,项目名称:LinOTP,代码行数:6,代码来源:spasstoken.py

示例12: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
    def __init__(self, aToken):
        TokenClass.__init__(self, aToken)
        self.setType(u"DPW")

        self.hKeyRequired = True
开发者ID:ae-m,项目名称:LinOTP,代码行数:7,代码来源:tagespassworttoken.py

示例13: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
 def __init__(self, aToken, context=None):
     TokenClass.__init__(self, aToken, context=context)
     self.setType(u"vasco")
     self.hKeyRequired = True
开发者ID:choth02,项目名称:LinOTP,代码行数:6,代码来源:vascotoken.py

示例14: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
 def __init__(self, token_model_object):
     TokenClass.__init__(self, token_model_object)
     self.setType(u'qr')
     self.mode = ['challenge']
     self.supports_offline_mode = True
开发者ID:gsnbng,项目名称:LinOTP,代码行数:7,代码来源:qrtoken.py

示例15: __init__

# 需要导入模块: from linotp.lib.tokenclass import TokenClass [as 别名]
# 或者: from linotp.lib.tokenclass.TokenClass import __init__ [as 别名]
    def __init__(self, aToken):
        TokenClass.__init__(self, aToken)
        self.setType(u"yubico")

        self.tokenid = ""
开发者ID:ukris,项目名称:LinOTP,代码行数:7,代码来源:yubicotoken.py


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