|
@@ -47,7 +47,7 @@ discard block |
|
|
block discarded – undo |
|
47
|
47
|
* @method \Psr\Http\Message\ResponseInterface steamWebAPIUtilGetSupportedAPIList() |
|
48
|
48
|
* @method \Psr\Http\Message\ResponseInterface storeServiceGetAppList(array $params = ['if_modified_since', 'have_description_language', 'include_games', 'include_dlc', 'include_software', 'include_videos', 'include_hardware', 'last_appid', 'max_results']) |
|
49
|
49
|
*/ |
|
50
|
|
-class SteamOpenID extends OAuthProvider{ |
|
|
50
|
+class SteamOpenID extends OAuthProvider { |
|
51
|
51
|
|
|
52
|
52
|
protected string $authURL = 'https://steamcommunity.com/openid/login'; |
|
53
|
53
|
protected string $accessTokenURL = 'https://steamcommunity.com/openid/login'; |
|
@@ -89,7 +89,7 @@ discard block |
|
|
block discarded – undo |
|
89
|
89
|
'openid.sig' => $received['openid_sig'], |
|
90
|
90
|
]; |
|
91
|
91
|
|
|
92
|
|
- foreach(explode(',', $received['openid_signed']) as $item){ |
|
|
92
|
+ foreach (explode(',', $received['openid_signed']) as $item) { |
|
93
|
93
|
$body['openid.'.$item] = $received['openid_'.$item]; |
|
94
|
94
|
} |
|
95
|
95
|
|
|
@@ -124,11 +124,11 @@ discard block |
|
|
block discarded – undo |
|
124
|
124
|
protected function parseTokenResponse(ResponseInterface $response):AccessToken{ |
|
125
|
125
|
$data = explode("\x0a", (string)$response->getBody()); |
|
126
|
126
|
|
|
127
|
|
- if(!isset($data[1]) || strpos($data[1], 'is_valid') !== 0){ |
|
|
127
|
+ if (!isset($data[1]) || strpos($data[1], 'is_valid') !== 0) { |
|
128
|
128
|
throw new ProviderException('unable to parse token response'); |
|
129
|
129
|
} |
|
130
|
130
|
|
|
131
|
|
- if($data[1] !== 'is_valid:true'){ |
|
|
131
|
+ if ($data[1] !== 'is_valid:true') { |
|
132
|
132
|
throw new ProviderException('invalid id'); |
|
133
|
133
|
} |
|
134
|
134
|
|
|
@@ -150,8 +150,8 @@ discard block |
|
|
block discarded – undo |
|
150
|
150
|
$params = ['key' => $this->options->secret]; |
|
151
|
151
|
|
|
152
|
152
|
// the steamid parameter does not necessarily specify the current user, so add it only when it's not already set |
|
153
|
|
- if(strpos($uri, 'steamid=') === false){ // php8: str_contains |
|
154
|
|
- $params['steamid']= $token->accessToken; |
|
|
153
|
+ if (strpos($uri, 'steamid=') === false) { // php8: str_contains |
|
|
154
|
+ $params['steamid'] = $token->accessToken; |
|
155
|
155
|
} |
|
156
|
156
|
|
|
157
|
157
|
return $request->withUri($this->uriFactory->createUri($this->mergeQuery($uri, $params))); |