コード例 #1
0
ファイル: nonce.py プロジェクト: lohanspies/pybitid_demo
 def __init__(self, sid):
     '''
     Constructor
     Parameters:
         sid = session id associated to the nonce
     '''
     self.sid = sid
     self.uid = None
     # Initializes a value for the nonce (let's call that the nonce id)
     self.nid = bitid.generate_nonce()
     # Sets the creation date
     self.created = datetime.now()
コード例 #2
0
ファイル: nonce.py プロジェクト: LaurentMT/pybitid_demo
 def __init__(self, sid):
     '''
     Constructor
     Parameters:
         sid = session id associated to the nonce
     '''
     self.sid = sid
     self.uid = None
     # Initializes a value for the nonce (let's call that the nonce id)
     self.nid = bitid.generate_nonce()
     # Sets the creation date
     self.created = datetime.now()
コード例 #3
0
ファイル: nonce.py プロジェクト: LaurentMT/pybitid_2fa_demo
 def __init__(self, sid):
     '''
     Constructor
     Parameters:
         sid = session id associated to the nonce
     '''
     self.sid = sid
     self.uid = None
     # Initializes a value for the nonce (let's call that the nonce id)
     self.nid = bitid.generate_nonce()
     # Sets the creation date
     self.created = datetime.now()
     # Sets the redirect uri
     self.redirect_uri = ""
     # Sets the bitcoin address used for 2fa
     self.tfa_address = None
コード例 #4
0
ファイル: nonce.py プロジェクト: lohanspies/pybitid_2fa_demo
 def __init__(self, sid):
     '''
     Constructor
     Parameters:
         sid = session id associated to the nonce
     '''
     self.sid = sid
     self.uid = None
     # Initializes a value for the nonce (let's call that the nonce id)
     self.nid = bitid.generate_nonce()
     # Sets the creation date
     self.created = datetime.now()
     # Sets the redirect uri
     self.redirect_uri = ""
     # Sets the bitcoin address used for 2fa
     self.tfa_address = None
コード例 #5
0
ファイル: pybitid_test.py プロジェクト: LaurentMT/pybitid
 def test_generate_nonce(self):
     len_nonce = len(bitid.generate_nonce())
     self.assertEqual(NONCE_LENGTH, len_nonce)  
コード例 #6
0
ファイル: pybitid_test.py プロジェクト: lohanspies/pybitid
 def test_generate_nonce(self):
     len_nonce = len(bitid.generate_nonce())
     self.assertEqual(NONCE_LENGTH, len_nonce)
コード例 #7
0
ファイル: models.py プロジェクト: dacox/django-bitid
    def save(self, *args, **kwargs):

        if self.pk is None:
            self.nid = bitid.generate_nonce()

        super(Nonce, self).save(*args, **kwargs)