Completed
Push — master ( 2ad5ca...d2b196 )
by Xu
74:33 queued 34:34
created
src/oauth2/actions/QRCode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         if (empty($code)) {
46 46
             $code = Yii::$app->security->generateRandomString(40);
47 47
         }
48
-        $attributes = Yii::$app->cache->getOrSet([self::CACHE_PREFIX, 'code' => $code], function ($cache) use ($code) {
48
+        $attributes = Yii::$app->cache->getOrSet([self::CACHE_PREFIX, 'code' => $code], function($cache) use ($code) {
49 49
             return [
50 50
                 'code' => $code,
51 51
                 'msg' => Yii::t('yuncms', 'Please use App Scan QR code to login.'),
Please login to merge, or discard this patch.
src/oauth2/actions/Token.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
     public $grantTypes = [
33 33
         'authorization_code' => 'yuncms\oauth2\grant\types\Authorization',
34 34
         'refresh_token' => 'yuncms\oauth2\grant\types\RefreshToken',
35
-        'client_credentials' => 'yuncms\oauth2\grant\types\ClientCredentials',//个人账户密码
36
-        'password' => 'yuncms\oauth2\grant\types\UserCredentials',//账户密码
37
-        'wechat' => 'yuncms\oauth2\grant\types\WechatCredentials',//微信
38
-        'qrcode' => 'yuncms\oauth2\grant\types\QRCode',//客户端扫码
35
+        'client_credentials' => 'yuncms\oauth2\grant\types\ClientCredentials', //个人账户密码
36
+        'password' => 'yuncms\oauth2\grant\types\UserCredentials', //账户密码
37
+        'wechat' => 'yuncms\oauth2\grant\types\WechatCredentials', //微信
38
+        'qrcode' => 'yuncms\oauth2\grant\types\QRCode', //客户端扫码
39 39
 //        'urn:ietf:params:oauth:grant-type:jwt-bearer' => 'yuncms\oauth2\grant\types\JwtBearer',//JWT 客户端签名
40 40
     ];
41 41
 
Please login to merge, or discard this patch.
src/oauth2/grant/types/WeChatCredentials.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
     {
149 149
         if ($this->_user === null) {
150 150
             $client = $this->wechat->openOAuth;
151
-            $client->useOpenId = false;//使用unionid
151
+            $client->useOpenId = false; //使用unionid
152 152
             $client->validateAuthState = false;
153 153
             $token = $client->fetchAccessToken($this->code);
154 154
             $tokenParams = $token->getParams();
Please login to merge, or discard this patch.
src/oauth2/models/OAuth2AccessToken.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
config/rest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         ],
Please login to merge, or discard this patch.