Mercurial > defr > drupal > core
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/modules/openid/openid.install Tue Dec 23 14:28:28 2008 +0100 @@ -0,0 +1,70 @@ +<?php +// $Id: openid.install,v 1.3 2007/10/10 11:39:33 goba Exp $ + +/** + * Implementation of hook_install(). + */ +function openid_install() { + // Create table. + drupal_install_schema('openid'); +} + +/** + * Implementation of hook_uninstall(). + */ +function openid_uninstall() { + // Remove table. + drupal_uninstall_schema('openid'); +} + +/** + * Implementation of hook_schema(). + */ +function openid_schema() { + $schema['openid_association'] = array( + 'description' => t('Stores temporary shared key association information for OpenID authentication.'), + 'fields' => array( + 'idp_endpoint_uri' => array( + 'type' => 'varchar', + 'length' => 255, + 'description' => t('URI of the OpenID Provider endpoint.'), + ), + 'assoc_handle' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'description' => t('Primary Key: Used to refer to this association in subsequent messages.'), + ), + 'assoc_type' => array( + 'type' => 'varchar', + 'length' => 32, + 'description' => t('The signature algorithm used: one of HMAC-SHA1 or HMAC-SHA256.'), + ), + 'session_type' => array( + 'type' => 'varchar', + 'length' => 32, + 'description' => t('Valid association session types: "no-encryption", "DH-SHA1", and "DH-SHA256".'), + ), + 'mac_key' => array( + 'type' => 'varchar', + 'length' => 255, + 'description' => t('The MAC key (shared secret) for this association.'), + ), + 'created' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('UNIX timestamp for when the association was created.'), + ), + 'expires_in' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => t('The lifetime, in seconds, of this association.'), + ), + ), + 'primary key' => array('assoc_handle'), + ); + + return $schema; +}