@@ -55,11 +55,11 @@ |
||
| 55 | 55 | public function attributeLabels() |
| 56 | 56 | { |
| 57 | 57 | return [ |
| 58 | - 'access_token' => Yii::t('yuncms','Access Token'), |
|
| 59 | - 'client_id' => Yii::t('yuncms','Client ID'), |
|
| 60 | - 'user_id' => Yii::t('yuncms','User ID'), |
|
| 61 | - 'expires' => Yii::t('yuncms','Expires'), |
|
| 62 | - 'scope' => Yii::t('yuncms','Scopes'), |
|
| 58 | + 'access_token' => Yii::t('yuncms', 'Access Token'), |
|
| 59 | + 'client_id' => Yii::t('yuncms', 'Client ID'), |
|
| 60 | + 'user_id' => Yii::t('yuncms', 'User ID'), |
|
| 61 | + 'expires' => Yii::t('yuncms', 'Expires'), |
|
| 62 | + 'scope' => Yii::t('yuncms', 'Scopes'), |
|
| 63 | 63 | ]; |
| 64 | 64 | } |
| 65 | 65 | |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | ], |
| 15 | 15 | 'components' => [ |
| 16 | 16 | 'cache' => [ |
| 17 | - 'keyPrefix' => 'rest',//前缀 |
|
| 17 | + 'keyPrefix' => 'rest', //前缀 |
|
| 18 | 18 | ], |
| 19 | 19 | 'request' => [ |
| 20 | 20 | 'class' => yuncms\web\Request::class, |
@@ -28,12 +28,12 @@ discard block |
||
| 28 | 28 | 'secureProtocolHeaders' => [ |
| 29 | 29 | 'X-Forwarded-Proto' => ['https'], // Common |
| 30 | 30 | 'Front-End-Https' => ['on'], // Microsoft |
| 31 | - 'X-Client-Scheme' => ['https'],// Aliyun CDN |
|
| 31 | + 'X-Client-Scheme' => ['https'], // Aliyun CDN |
|
| 32 | 32 | 'X-Client-Proto' => ['https'], |
| 33 | 33 | ], |
| 34 | 34 | 'ipHeaders' => [ |
| 35 | - 'X-Forwarded-For',// Common |
|
| 36 | - 'ALI-CDN-REAL-IP',// Aliyun CDN |
|
| 35 | + 'X-Forwarded-For', // Common |
|
| 36 | + 'ALI-CDN-REAL-IP', // Aliyun CDN |
|
| 37 | 37 | 'X-Cluster-Client-IP', |
| 38 | 38 | ], |
| 39 | 39 | ], |
@@ -166,7 +166,7 @@ |
||
| 166 | 166 | if (($model = OAuth2Client::findOne(['client_id' => $id])) !== null) { |
| 167 | 167 | return $model; |
| 168 | 168 | } else { |
| 169 | - throw new NotFoundHttpException (Yii::t('yuncms', 'The requested page does not exist.')); |
|
| 169 | + throw new NotFoundHttpException(Yii::t('yuncms', 'The requested page does not exist.')); |
|
| 170 | 170 | } |
| 171 | 171 | } |
| 172 | 172 | } |
| 173 | 173 | \ No newline at end of file |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | 'redirect_uri:url', |
| 65 | 65 | [ |
| 66 | 66 | 'label' => Yii::t('yuncms', 'Grant type'), |
| 67 | - 'value' => function ($model) { |
|
| 67 | + 'value' => function($model) { |
|
| 68 | 68 | if (empty($model->grant_type)) { |
| 69 | 69 | return Yii::t('yuncms', 'All Type'); |
| 70 | 70 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $this->title = Yii::t('yuncms', 'Manage Client'); |
| 15 | 15 | $this->params['breadcrumbs'][] = $this->title; |
| 16 | 16 | $this->registerJs("jQuery(\"#batch_deletion\").on(\"click\", function () { |
| 17 | - yii.confirm('" . Yii::t('yuncms', 'Are you sure you want to delete this item?')."',function(){ |
|
| 17 | + yii.confirm('" . Yii::t('yuncms', 'Are you sure you want to delete this item?') . "',function(){ |
|
| 18 | 18 | var ids = jQuery('#gridview').yiiGridView(\"getSelectedRows\"); |
| 19 | 19 | jQuery.post(\"/oauth2/batch-delete\",{ids:ids}); |
| 20 | 20 | }); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | ], |
| 65 | 65 | [ |
| 66 | 66 | 'label' => Yii::t('yuncms', 'App Name'), |
| 67 | - 'value' => function ($model) { |
|
| 67 | + 'value' => function($model) { |
|
| 68 | 68 | return Html::a(Html::encode($model->name), ['/admin/oauth2/view', 'id' => $model->client_id]); |
| 69 | 69 | }, |
| 70 | 70 | 'format' => 'html' |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | /* @var yuncms\oauth2\models\OAuth2Client $model */ |
| 8 | 8 | /* @var ActiveForm $form */ |
| 9 | 9 | ?> |
| 10 | -<?php $form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false,]); ?> |
|
| 10 | +<?php $form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false, ]); ?> |
|
| 11 | 11 | |
| 12 | 12 | <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?> |
| 13 | 13 | <div class="hr-line-dashed"></div> |
@@ -152,7 +152,7 @@ |
||
| 152 | 152 | if (($model = OAuth2Client::findOne(['client_id' => $id, 'user_id' => Yii::$app->user->id])) !== null) { |
| 153 | 153 | return $model; |
| 154 | 154 | } else { |
| 155 | - throw new NotFoundHttpException (Yii::t('yuncms', 'The requested page does not exist.')); |
|
| 155 | + throw new NotFoundHttpException(Yii::t('yuncms', 'The requested page does not exist.')); |
|
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | \ No newline at end of file |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | 'redirect_uri' => $this->text()->notNull()->comment('Redirect Uri'), |
| 31 | 31 | 'expires' => $this->integer()->notNull()->comment('Expires'), |
| 32 | 32 | 'scope' => $this->text()->comment('Scope'), |
| 33 | - ],$tableOptions); |
|
| 33 | + ], $tableOptions); |
|
| 34 | 34 | |
| 35 | 35 | $this->addPrimaryKey('pk', $this->tableName, 'authorization_code'); |
| 36 | 36 | $this->createIndex('ix_authorization_code_expires', $this->tableName, 'expires'); |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | 'user_id' => $this->integer()->unsigned()->comment('User Id'), |
| 30 | 30 | 'expires' => $this->integer()->notNull()->comment('Expires'), |
| 31 | 31 | 'scope' => $this->text()->comment('Scope'), |
| 32 | - ],$tableOptions); |
|
| 32 | + ], $tableOptions); |
|
| 33 | 33 | |
| 34 | 34 | $this->addPrimaryKey('pk', $this->tableName, 'refresh_token'); |
| 35 | 35 | $this->createIndex('ix_refresh_token_expires', $this->tableName, 'expires'); |