Пример #1
0
    def __init__(self, aToken):
        '''
        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)
        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
Пример #2
0
    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
Пример #3
0
    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
Пример #4
0
    def __init__(self, a_token):
        '''
        constructor - create a token object

        :param a_token: instance of the orm db object
        :type a_token:  orm object
        '''
        TokenClass.__init__(self, a_token)
        self.setType(u"mOTP")

        return
Пример #5
0
    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
Пример #6
0
    def __init__(self, aToken):
        """
        constructor - create a token object

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

        """
        TokenClass.__init__(self, aToken)
        self.setType(u"u2f")
        self.mode = ['challenge']  # This is a challenge response token
        self.supports_offline_mode = True
Пример #7
0
    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
Пример #8
0
    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
Пример #9
0
    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")
Пример #10
0
    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")
Пример #11
0
    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']
Пример #12
0
    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']
Пример #13
0
    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
Пример #14
0
    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
Пример #15
0
    def __init__(self, a_token):
        '''
        constructor - create a token object

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

        '''

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

        # 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.exception('[init] Failed to get the hotp.hashlib (%r)' % (ex))
            raise Exception(ex)
Пример #16
0
    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
Пример #17
0
    def __init__(self, aToken):
        TokenClass.__init__(self, aToken)
        self.setType(u"yubico")

        self.tokenid = ""
Пример #18
0
 def __init__(self, aToken, context=None):
     TokenClass.__init__(self, aToken, context=context)
     self.setType(u"vasco")
     self.hKeyRequired = True
Пример #19
0
    def __init__(self, aToken):
        TokenClass.__init__(self, aToken)
        self.setType(u"DPW")

        self.hKeyRequired = True
Пример #20
0
    def __init__(self, aToken):
        TokenClass.__init__(self, aToken)
        self.setType(u"DPW")

        self.hKeyRequired = True
Пример #21
0
 def __init__(self, token_model_object):
     TokenClass.__init__(self, token_model_object)
     self.setType(u'qr')
     self.mode = ['challenge']
     self.supports_offline_mode = True
Пример #22
0
    def __init__(self, aToken):
        TokenClass.__init__(self, aToken)
        self.setType(u"yubikey")

        self.hKeyRequired = True
        return
Пример #23
0
 def __init__(self, aToken):
     TokenClass.__init__(self, aToken)
     self.setType(u"spass")
     self.mode = ['authenticate']
Пример #24
0
 def __init__(self, aToken, context=None):
     TokenClass.__init__(self, aToken, context=context)
     self.setType(u"spass")
     self.mode = ['authenticate']
Пример #25
0
 def __init__(self, aToken, context=None):
     TokenClass.__init__(self, aToken, context=context)
     self.setType(u"vasco")
     self.hKeyRequired = True
Пример #26
0
    def __init__(self, aToken, context=None):
        TokenClass.__init__(self, aToken, context=context)
        self.setType(u"yubico")

        self.tokenid = ""
Пример #27
0
 def __init__ (self, token_model_object):
     TokenClass.__init__(self, token_model_object)
     self.setType(u'qr')
     self.mode = ['challenge']
Пример #28
0
 def __init__(self, aToken, context=None):
     TokenClass.__init__(self, aToken, context=context)
     self.setType(u"spass")
     self.mode = ["authenticate"]
Пример #29
0
 def __init__(self, token_model_object):
     TokenClass.__init__(self, token_model_object)
     self.setType(u'push')
     self.mode = ['challenge']
     self.supports_offline_mode = False
Пример #30
0
    def __init__(self, aToken):
        TokenClass.__init__(self, aToken)
        self.setType(u"yubico")

        self.tokenid = ""
Пример #31
0
    def __init__(self, aToken):
        TokenClass.__init__(self, aToken)
        self.setType(u"yubikey")

        self.hKeyRequired = True
        return
Пример #32
0
 def __init__(self, aToken):
     TokenClass.__init__(self, aToken)
     self.setType(u"spass")
     self.mode = ['authenticate']
Пример #33
0
    def __init__(self, aToken, context=None):
        TokenClass.__init__(self, aToken, context=context)
        self.setType(u"yubikey")

        self.hKeyRequired = True
        return
Пример #34
0
    def __init__(self, aToken, context=None):
        TokenClass.__init__(self, aToken, context=context)
        self.setType(u"yubikey")

        self.hKeyRequired = True
        return