X-Git-Url: https://git-public.kairo.at/?p=authserver.git;a=blobdiff_plain;f=app%2Fauthutils.php-class;h=440a153140b3c92fb594492cfe5c5a4b5450e9d6;hp=df41e7123beb93b72426d36d222c7d2f7b4a73b9;hb=55648bcf1a3d50e77d2077de5d2c9f2ad0631bfd;hpb=6cc92a647eb11c7d3fb311dd362d55fb681b7706 diff --git a/app/authutils.php-class b/app/authutils.php-class index df41e71..440a153 100755 --- a/app/authutils.php-class +++ b/app/authutils.php-class @@ -503,6 +503,12 @@ class AuthUtils { // Add the "Refresh Token" grant type (required to get longer-living resource access by generating new access tokens) $server->addGrantType(new OAuth2\GrantType\RefreshToken($oauth2_storage, array('always_issue_new_refresh_token' => true))); + // Add 'token' response type (mirroring what getDefaultResponseTypes is doing). + $server->addResponseType(new OAuth2\ResponseType\AccessToken($oauth2_storage, $oauth2_storage, $oauth2_config)); + + // Add 'code' response type (mirroring what getDefaultResponseTypes is doing). + $server->addResponseType(new OAuth2\ResponseType\AuthorizationCode($oauth2_storage)); + return $server; } @@ -610,7 +616,7 @@ class AuthUtils { $table->addColumn('logged_in', 'boolean', array('notnull' => true, 'default' => false)); $table->addColumn('time_created', 'datetime', array('notnull' => true, 'default' => 'CURRENT_TIMESTAMP')); $table->addColumn('time_expire', 'datetime', array('notnull' => true, 'default' => 'CURRENT_TIMESTAMP')); - $table->addColumn('saved_redirect', 'string', array('length' => 255, 'notnull' => true, 'default' => '')); + $table->addColumn('saved_redirect', 'string', array('length' => 2000, 'notnull' => true, 'default' => '')); $table->setPrimaryKey(array('id'), 'id'); $table->addIndex(array('sesskey'), 'sesskey'); $table->addIndex(array('time_expire'), 'time_expire');