update to newer DBAL and oauth-server (though DBAL is still ancient) master
authorRobert Kaiser <kairo@kairo.at>
Fri, 13 Jun 2025 19:37:44 +0000 (21:37 +0200)
committerRobert Kaiser <kairo@kairo.at>
Fri, 13 Jun 2025 19:37:44 +0000 (21:37 +0200)
app/authutils.php-class
composer.json

index 17eb8da2a16e95639fb144978aaa5650f2ee22c2..0bd4eb89bf0ad21dd539ac9a477ab8438971453e 100755 (executable)
@@ -653,45 +653,52 @@ class AuthUtils {
     $table->addColumn('client_secret', 'string', array('length' => 80, 'notnull' => false));
     $table->addColumn('redirect_uri', 'string', array('length' => 2000, 'notnull' => true));
     $table->addColumn('grant_types', 'string', array('length' => 80, 'notnull' => false));
-    $table->addColumn('scope', 'string', array('length' => 100, 'notnull' => false));
+    $table->addColumn('scope', 'string', array('length' => 4000, 'notnull' => false));
     $table->addColumn('user_id', 'string', array('length' => 80, 'notnull' => false));
     $table->setPrimaryKey(array('client_id'), 'clients_client_id_pk');
 
     $table = $schema->createTable('oauth_access_tokens');
     $table->addColumn('access_token', 'string', array('length' => 40, 'notnull' => true));
     $table->addColumn('client_id', 'string', array('length' => 80, 'notnull' => true));
-    $table->addColumn('user_id', 'string', array('length' => 255, 'notnull' => false));
+    $table->addColumn('user_id', 'string', array('length' => 80, 'notnull' => false));
     $table->addColumn('expires', 'datetime', array('notnull' => true));
-    $table->addColumn('scope', 'string', array('length' => 2000, 'notnull' => false));
+    $table->addColumn('scope', 'string', array('length' => 4000, 'notnull' => false));
     $table->setPrimaryKey(array('access_token'), 'access_token_pk');
 
     $table = $schema->createTable('oauth_authorization_codes');
     $table->addColumn('authorization_code', 'string', array('length' => 40, 'notnull' => true));
     $table->addColumn('client_id', 'string', array('length' => 80, 'notnull' => true));
-    $table->addColumn('user_id', 'string', array('length' => 255, 'notnull' => false));
+    $table->addColumn('user_id', 'string', array('length' => 80, 'notnull' => false));
     $table->addColumn('redirect_uri', 'string', array('length' => 2000, 'notnull' => false));
     $table->addColumn('expires', 'datetime', array('notnull' => true));
-    $table->addColumn('scope', 'string', array('length' => 2000, 'notnull' => false));
+    $table->addColumn('scope', 'string', array('length' => 4000, 'notnull' => false));
+    $table->addColumn('id_token', 'string', array('length' => 1000, 'notnull' => false));
+    $table->addColumn('code_challenge', 'string', array('length' => 1000, 'notnull' => false));
+    $table->addColumn('code_challenge_method', 'string', array('length' => 20, 'notnull' => false));
     $table->setPrimaryKey(array('authorization_code'), 'auth_code_pk');
 
     $table = $schema->createTable('oauth_refresh_tokens');
     $table->addColumn('refresh_token', 'string', array('length' => 40, 'notnull' => true));
     $table->addColumn('client_id', 'string', array('length' => 80, 'notnull' => true));
-    $table->addColumn('user_id', 'string', array('length' => 255, 'notnull' => false));
+    $table->addColumn('user_id', 'string', array('length' => 80, 'notnull' => false));
     $table->addColumn('expires', 'datetime', array('notnull' => true));
-    $table->addColumn('scope', 'string', array('length' => 2000, 'notnull' => false));
+    $table->addColumn('scope', 'string', array('length' => 4000, 'notnull' => false));
     $table->setPrimaryKey(array('refresh_token'), 'refresh_token_pk');
 
     $table = $schema->createTable('oauth_users');
-    $table->addColumn('username', 'string', array('length' => 255, 'notnull' => true));
-    $table->addColumn('password', 'string', array('length' => 2000, 'notnull' => false));
-    $table->addColumn('first_name', 'string', array('length' => 255, 'notnull' => false));
-    $table->addColumn('last_name', 'string', array('length' => 255, 'notnull' => false));
+    $table->addColumn('username', 'string', array('length' => 80, 'notnull' => true));
+    $table->addColumn('password', 'string', array('length' => 80, 'notnull' => false));
+    $table->addColumn('first_name', 'string', array('length' => 80, 'notnull' => false));
+    $table->addColumn('last_name', 'string', array('length' => 80, 'notnull' => false));
+    $table->addColumn('email', 'string', array('length' => 80, 'notnull' => false));
+    $table->addColumn('email_verified', 'boolean', array('notnull' => true, 'default' => false));
+    $table->addColumn('scope', 'string', array('length' => 4000, 'notnull' => false));
     $table->setPrimaryKey(array('username'), 'username_pk');
 
     $table = $schema->createTable('oauth_scopes');
-    $table->addColumn('scope', 'text', array('notnull' => false));
+    $table->addColumn('scope', 'string', array('length' => 80, 'notnull' => false));
     $table->addColumn('is_default', 'boolean', array('notnull' => false));
+    $table->setPrimaryKey(array('scope'), 'scope_pk');
 
     $table = $schema->createTable('oauth_jwt');
     $table->addColumn('client_id', 'string', array('length' => 80, 'notnull' => true));
index 9a4a94f17d1d2b15badbff6865b0ac26b8e1c2f3..2cc1a3db6893c971dd0040b89d26d718938ebc57 100644 (file)
@@ -1,6 +1,6 @@
 {
   "require": {
-    "doctrine/dbal": "^v2.12.1",
-    "bshaffer/oauth2-server-php": "~1.11.1"
+    "doctrine/dbal": "^v2.13.8",
+    "bshaffer/oauth2-server-php": "^1.14.2"
   }
 }
\ No newline at end of file