@@ -66,7 +66,7 @@ |
||
66 | 66 | $storageEncryptionKeys = $module->storageEncryptionKeys ? '[SET]' : '[NOT SET]'; |
67 | 67 | |
68 | 68 | return [ |
69 | - 'serverRole' => $module->serverRole . ' (' .implode(', ', $serverRoles) . ')', |
|
69 | + 'serverRole' => $module->serverRole . ' (' . implode(', ', $serverRoles) . ')', |
|
70 | 70 | |
71 | 71 | 'privateKey' => $privateKey, |
72 | 72 | 'privateKeyPassphrase' => $privateKeyPassphrase, |
@@ -49,11 +49,11 @@ |
||
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)) { |
@@ -163,11 +163,3 @@ |
||
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); |
@@ -163,11 +163,3 @@ |
||
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); |
@@ -163,11 +163,3 @@ |
||
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); |
@@ -130,14 +130,17 @@ discard block |
||
130 | 130 | </div> |
131 | 131 | </div> |
132 | 132 | <?php endif; ?> |
133 | - <?php else: ?> |
|
133 | + <?php else { |
|
134 | + : ?> |
|
134 | 135 | <h3 class="oauth2_authorize-client-modal-title oauth2_authorize-client-modal-title_no-scopes"> |
135 | 136 | <?= Yii::t('oauth2', '{clientName} would like to access {appName} on your behalf.', [ |
136 | 137 | 'clientName' => Html::encode($clientAuthorizationRequest->getClient()->getName()), |
137 | 138 | 'appName' => Yii::$app->name, |
138 | 139 | ]) ?> |
139 | 140 | </h3> |
140 | - <?php endif; ?> |
|
141 | + <?php endif; |
|
142 | +} |
|
143 | +?> |
|
141 | 144 | </div> |
142 | 145 | <div class="oauth2_authorize-client-modal-footer"> |
143 | 146 | <button |
@@ -163,11 +166,3 @@ discard block |
||
163 | 166 | |
164 | 167 | <?php |
165 | 168 | $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); |
@@ -163,11 +163,3 @@ |
||
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); |
@@ -18,7 +18,7 @@ |
||
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 |
@@ -115,7 +115,7 @@ |
||
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(), |