@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | 'state' => $this->config['state'], |
40 | 40 | 'scope' => $this->config['scope'], |
41 | 41 | ]; |
42 | - return $this->AuthorizeURL . '?' . http_build_query($params); |
|
42 | + return $this->AuthorizeURL.'?'.http_build_query($params); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $this->openid(); |
80 | 80 | |
81 | 81 | $headers = ['Authorization: Bearer '.$this->token['access_token']]; |
82 | - $data = $this->get($this->UserInfoURL, [],$headers); |
|
82 | + $data = $this->get($this->UserInfoURL, [], $headers); |
|
83 | 83 | return json_decode($data, true); |
84 | 84 | } |
85 | 85 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @author: JiaMeng <[email protected]> |
102 | 102 | * Updater: |
103 | 103 | */ |
104 | - protected function getToken(){ |
|
104 | + protected function getToken() { |
|
105 | 105 | if (empty($this->token)) { |
106 | 106 | /** 验证state参数 */ |
107 | 107 | $this->CheckState(); |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | $params = $this->accessTokenParams(); |
111 | 111 | |
112 | 112 | /** 获取access_token */ |
113 | - $this->AccessTokenURL = $this->AccessTokenURL . '?' . http_build_query($params); |
|
114 | - $token = $this->post($this->AccessTokenURL); |
|
113 | + $this->AccessTokenURL = $this->AccessTokenURL.'?'.http_build_query($params); |
|
114 | + $token = $this->post($this->AccessTokenURL); |
|
115 | 115 | /** 解析token值(子类实现此方法) */ |
116 | 116 | $this->token = $this->parseToken($token); |
117 | 117 | } |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | 'scope' => $this->config['scope'], |
52 | 52 | 'state' => $this->config['state'], |
53 | 53 | 'display' => $this->display, |
54 | - 'allow_signup' => true,//是否会在OAuth流程中为未经身份验证的用户提供注册GitHub的选项。默认是true。false在策略禁止注册的情况下使用。 |
|
54 | + 'allow_signup' => true, //是否会在OAuth流程中为未经身份验证的用户提供注册GitHub的选项。默认是true。false在策略禁止注册的情况下使用。 |
|
55 | 55 | ]; |
56 | - return $this->AuthorizeURL . '?' . http_build_query($params); |
|
56 | + return $this->AuthorizeURL.'?'.http_build_query($params); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $headers = [ |
114 | 114 | 'User-Agent: '.$this->config['application_name'], |
115 | 115 | 'UserModel-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 ', |
116 | - 'Authorization: token ' . $this->token['access_token'], |
|
116 | + 'Authorization: token '.$this->token['access_token'], |
|
117 | 117 | 'Accept: application/json' |
118 | 118 | ]; |
119 | 119 | $response = $this->get($this->UserInfoURL, [], $headers); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | 'state' => $this->config['state'], |
40 | 40 | 'scope' => $this->config['scope'], |
41 | 41 | ]; |
42 | - return $this->AuthorizeURL . '?' . http_build_query($params); |
|
42 | + return $this->AuthorizeURL.'?'.http_build_query($params); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $this->openid(); |
80 | 80 | |
81 | 81 | $headers = ['Authorization: Bearer '.$this->token['access_token']]; |
82 | - $data = $this->get($this->UserInfoURL, [],$headers); |
|
82 | + $data = $this->get($this->UserInfoURL, [], $headers); |
|
83 | 83 | return json_decode($data, true); |
84 | 84 | } |
85 | 85 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @author: JiaMeng <[email protected]> |
102 | 102 | * Updater: |
103 | 103 | */ |
104 | - protected function getToken(){ |
|
104 | + protected function getToken() { |
|
105 | 105 | if (empty($this->token)) { |
106 | 106 | /** 验证state参数 */ |
107 | 107 | $this->CheckState(); |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | $params = $this->accessTokenParams(); |
111 | 111 | |
112 | 112 | /** 获取access_token */ |
113 | - $this->AccessTokenURL = $this->AccessTokenURL . '?' . http_build_query($params); |
|
114 | - $token = $this->post($this->AccessTokenURL); |
|
113 | + $this->AccessTokenURL = $this->AccessTokenURL.'?'.http_build_query($params); |
|
114 | + $token = $this->post($this->AccessTokenURL); |
|
115 | 115 | /** 解析token值(子类实现此方法) */ |
116 | 116 | $this->token = $this->parseToken($token); |
117 | 117 | } |