home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / CMS / drupal-6.0.exe / drupal-6.0 / modules / openid / openid.install < prev    next >
Encoding:
Text File  |  2007-10-10  |  1.9 KB  |  71 lines

  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. }
  71.