@@ -33,8 +33,8 @@ |
||
33 | 33 | public function actions() |
34 | 34 | { |
35 | 35 | return [ |
36 | - static::ACTION_NAME_ACCESS_TOKEN => Oauth2AccessTokenAction::class, |
|
37 | - static::ACTION_NAME_AUTHORIZE => Oauth2AuthorizeAction::class, |
|
36 | + static::ACTION_NAME_ACCESS_TOKEN => Oauth2AccessTokenAction::class, |
|
37 | + static::ACTION_NAME_AUTHORIZE => Oauth2AuthorizeAction::class, |
|
38 | 38 | ]; |
39 | 39 | } |
40 | 40 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | public function actions() |
32 | 32 | { |
33 | 33 | return [ |
34 | - static::ACTION_NAME_JWKS => Oauth2JwksAction::class, |
|
34 | + static::ACTION_NAME_JWKS => Oauth2JwksAction::class, |
|
35 | 35 | ]; |
36 | 36 | } |
37 | 37 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | $response->data = $this->generateOpenIdConnectUserClaims($identity, $module, $nonce); |
58 | 58 | return $response; |
59 | 59 | |
60 | - } elseif($userInfoAlg == 'RS256') { |
|
60 | + } elseif ($userInfoAlg == 'RS256') { |
|
61 | 61 | |
62 | 62 | $response->format = Response::FORMAT_RAW; |
63 | 63 | $response->headers->add('Content-Type', 'application/jwt'); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | public function actions() |
32 | 32 | { |
33 | 33 | return [ |
34 | - static::ACTION_NAME_OPENID_CONFIGURATION => Oauth2OpenidConfigurationAction::class, |
|
34 | + static::ACTION_NAME_OPENID_CONFIGURATION => Oauth2OpenidConfigurationAction::class, |
|
35 | 35 | ]; |
36 | 36 | } |
37 | 37 | } |
@@ -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(), |