Test Failed
Branch master (c1f513)
by Rutger
03:30
created
src/controllers/console/client/Oauth2CreateClientAction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@
 block discarded – undo
49 49
 
50 50
         $this->controller->stdout("Creating new Oath2 Client\n");
51 51
 
52
-        if (empty($identifer)){
52
+        if (empty($identifer)) {
53 53
             $identifier = $this->controller->prompt('Client Identifier?', [
54 54
                 'required' => true,
55 55
                 'default' => $defaultIdentifier ?? null,
56
-                'validator' => function ($input, &$error) {
56
+                'validator' => function($input, &$error) {
57 57
                     /** @var string|Oauth2ClientInterface $clientClass */
58 58
                     $clientClass = DiHelper::getValidatedClassName(Oauth2ClientInterface::class);
59 59
                     if ($clientClass::findByIdentifier($input)) {
Please login to merge, or discard this patch.
src/views/consent/authorize-client.php 1 patch
Spacing   -8 removed lines patch added patch discarded remove patch
@@ -163,11 +163,3 @@
 block discarded – undo
163 163
 
164 164
 <?php
165 165
 $js = <<<'JS'
166
-    $('#oauth2_authorize-client-previously-approved-scopes-toggle').click(function(e) {
167
-        $('#oauth2_authorize-client-previously-approved-scopes-list').slideToggle();
168
-        $(this).toggleClass('open');
169
-        e.preventDefault();
170
-    });
171
-    JS;
172
-
173
-$this->registerJs($js);
Please login to merge, or discard this patch.
src/views/consent/_authorize-client-scope-list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         $scope = $scopeRequest->getScope();
19 19
         $inputId = Html::getInputId($clientAuthorizationRequest, 'selectedScopeIdentifiers')
20 20
                         . '-'
21
-                        . preg_replace('/[^a-z0-9_]/','_',  mb_strtolower($scope->getIdentifier()));
21
+                        . preg_replace('/[^a-z0-9_]/', '_', mb_strtolower($scope->getIdentifier()));
22 22
 
23 23
         $authorizationMessage = $scope->getAuthorizationMessage() ?? $scope->getDescription() ?? $scope->getIdentifier();
24 24
 
Please login to merge, or discard this patch.
src/migrations/Oauth2_00001_CreateOauth2TablesMigration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
                     ->comment('Skip user authorization of client if there are no scopes that require authorization.'),
116 116
                 'client_credentials_grant_user_id' => ($userTable ? $userPkSchema->dbType : Schema::TYPE_STRING)
117 117
                     . ' COMMENT "Optional user id to use in case of grant type \'client_credentials\'.'
118
-                    . ' This user account should also be connected to the client via the `'.$userClientTable.'` table and, if applicable, the `'.$userClientScopeTable.'` table."',
118
+                    . ' This user account should also be connected to the client via the `' . $userClientTable . '` table and, if applicable, the `' . $userClientScopeTable . '` table."',
119 119
                 'oidc_allow_offline_access_without_consent' => $this->boolean()->notNull()->defaultValue(0)
120 120
                     ->comment('Allow the OpenID Connect "offline_access" scope for this client without the "prompt" parameter contains "consent".'),
121 121
                 'oidc_userinfo_encrypted_response_alg' => $this->string(),
Please login to merge, or discard this patch.
sample/config/main.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,14 +37,14 @@
 block discarded – undo
37 37
                 '2021-01-01' => getenv('YII2_OAUTH2_SERVER_STORAGE_ENCRYPTION_KEY'), // The encryption key for storage like client secrets
38 38
             ],
39 39
             'defaultStorageEncryptionKey' => '2021-01-01', // The index of the default key in storageEncryptionKeys
40
-            'grantTypes' => [ // For more information which grant types to use, please see https://oauth2.thephpleague.com/authorization-server/which-grant/
40
+            'grantTypes' => [// For more information which grant types to use, please see https://oauth2.thephpleague.com/authorization-server/which-grant/
41 41
                 Oauth2Module::GRANT_TYPE_AUTH_CODE,
42 42
                 Oauth2Module::GRANT_TYPE_CLIENT_CREDENTIALS,
43 43
                 Oauth2Module::GRANT_TYPE_IMPLICIT,
44 44
                 Oauth2Module::GRANT_TYPE_PASSWORD,
45 45
                 Oauth2Module::GRANT_TYPE_REFRESH_TOKEN,
46 46
             ],
47
-            'migrationsNamespace' => 'sample\\migrations\\oauth2',  // The namespace with which migrations will be created (and by which they will be located).
47
+            'migrationsNamespace' => 'sample\\migrations\\oauth2', // The namespace with which migrations will be created (and by which they will be located).
48 48
             'enableOpenIdConnect' => true, // Only required if OpenID Connect support is required
49 49
             'defaultUserAccountSelection' => Oauth2Module::USER_ACCOUNT_SELECTION_UPON_CLIENT_REQUEST, // Allow clients to request user account selection (OpenID Connect)
50 50
             'migrationsFileOwnership' => '1000:1000',
Please login to merge, or discard this patch.