]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OpenID/OpenIDPlugin.php
move core schema to class files
[quix0rs-gnu-social.git] / plugins / OpenID / OpenIDPlugin.php
index a2afe91f9a11e122d45db7c009bed4e5a73bd9a7..023ff8e86d2e26c0ce39fee9c792713a5a05aef7 100644 (file)
@@ -576,6 +576,33 @@ class OpenIDPlugin extends Plugin
                                    new ColumnDef('created', 'datetime',
                                                  null, false),
                                    new ColumnDef('modified', 'timestamp')));
+
+        /* These are used by JanRain OpenID library */
+
+        $schema->ensureTable('oid_associations',
+                             array(
+                                 'fields' => array(
+                                     'server_url' => array('type' => 'blob', 'not null' => true),
+                                     'handle' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'default' => ''), // character set latin1,
+                                     'secret' => array('type' => 'blob'),
+                                     'issued' => array('type' => 'int'),
+                                     'lifetime' => array('type' => 'int'),
+                                     'assoc_type' => array('type' => 'varchar', 'length' => 64),
+                                 ),
+                                 'primary key' => array(array('server_url', 255), 'handle'),
+                             ));
+        $schema->ensureTable('oid_nonces',
+                             array(
+                                 'fields' => array(
+                                     'server_url' => array('type' => 'varchar', 'length' => 2047),
+                                     'timestamp' => array('type' => 'int'),
+                                     'salt' => array('type' => 'char', 'length' => 40),
+                                 ),
+                                 'unique keys' => array(
+                                     'oid_nonces_server_url_timestamp_salt_key' => array(array('server_url', 255), 'timestamp', 'salt'),
+                                 ),
+                             ));
+
         return true;
     }