comparison modules/openid/openid.install @ 1:c1f4ac30525a 6.0

Drupal 6.0
author Franck Deroche <webmaster@defr.org>
date Tue, 23 Dec 2008 14:28:28 +0100
parents
children 3edae6ecd6c6
comparison
equal deleted inserted replaced
0:5a113a1c4740 1:c1f4ac30525a
1 <?php
2 // $Id: openid.install,v 1.3 2007/10/10 11:39:33 goba Exp $
3
4 /**
5 * Implementation of hook_install().
6 */
7 function openid_install() {
8 // Create table.
9 drupal_install_schema('openid');
10 }
11
12 /**
13 * Implementation of hook_uninstall().
14 */
15 function openid_uninstall() {
16 // Remove table.
17 drupal_uninstall_schema('openid');
18 }
19
20 /**
21 * Implementation of hook_schema().
22 */
23 function openid_schema() {
24 $schema['openid_association'] = array(
25 'description' => t('Stores temporary shared key association information for OpenID authentication.'),
26 'fields' => array(
27 'idp_endpoint_uri' => array(
28 'type' => 'varchar',
29 'length' => 255,
30 'description' => t('URI of the OpenID Provider endpoint.'),
31 ),
32 'assoc_handle' => array(
33 'type' => 'varchar',
34 'length' => 255,
35 'not null' => TRUE,
36 'description' => t('Primary Key: Used to refer to this association in subsequent messages.'),
37 ),
38 'assoc_type' => array(
39 'type' => 'varchar',
40 'length' => 32,
41 'description' => t('The signature algorithm used: one of HMAC-SHA1 or HMAC-SHA256.'),
42 ),
43 'session_type' => array(
44 'type' => 'varchar',
45 'length' => 32,
46 'description' => t('Valid association session types: "no-encryption", "DH-SHA1", and "DH-SHA256".'),
47 ),
48 'mac_key' => array(
49 'type' => 'varchar',
50 'length' => 255,
51 'description' => t('The MAC key (shared secret) for this association.'),
52 ),
53 'created' => array(
54 'type' => 'int',
55 'not null' => TRUE,
56 'default' => 0,
57 'description' => t('UNIX timestamp for when the association was created.'),
58 ),
59 'expires_in' => array(
60 'type' => 'int',
61 'not null' => TRUE,
62 'default' => 0,
63 'description' => t('The lifetime, in seconds, of this association.'),
64 ),
65 ),
66 'primary key' => array('assoc_handle'),
67 );
68
69 return $schema;
70 }