-
Notifications
You must be signed in to change notification settings - Fork 0
/
multifactor.install
42 lines (40 loc) · 1.15 KB
/
multifactor.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
function multifactor_schema () {
$schema['multifactor_nonce'] = array(
'description' => t('A table to organize single use nonces for multifactor authentication.'),
'fields' => array(
'nonce_id' => array(
'description' => t('Unique id for deleting nonces.'),
'type' => 'serial',
'not null' => TRUE,
),
'uid' => array(
'description' => t('The user id associated with this nonce.'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'timestamp' => array(
'description' => t('The timestamp used in determining stale, in/valid nonces. '),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'module' => array(
'description' => t('The module that created this nonce.'),
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array('nonce_id'),
'unique keys' => array(
'user, module' => array('uid', 'module')
),
'indexes' => array(
'uid, module' => array('uid', 'module'),
),
);
return $schema;
}