@@ -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); |
|
@@ -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(), |
@@ -37,14 +37,14 @@ |
||
| 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', |