Skip to content

Commit 85e2c38

Browse files
authored
Update PhutilMediaWikiAuthAdapter.php
1 parent 29d1fbb commit 85e2c38

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/oauth/PhutilMediaWikiAuthAdapter.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,8 @@ protected function loadOAuthAccountData() {
103103
$token_header = sprintf('Bearer %s', $this->getAccessToken());
104104
$future->addHeader('Authorization', $token_header);
105105
list($body) = $future->resolvex();
106-
try {
107-
$data = $this->decodeJWT($body);
108-
return $data['result'];
109-
} catch (Exception $ex) {
110-
throw new Exception(
111-
pht(
112-
'Expected valid JSON response from MediaWiki request'),
113-
$ex);
114-
}
106+
$data = $this->decodeJWT($body);
107+
return $data['result'];
115108
}
116109

117110
private function decodeJWT($jwt) {

0 commit comments

Comments
 (0)