Skip to content

Commit

Permalink
Profile 못 가져올 경우에 대한 방어 코드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Joungkyun committed Jan 28, 2018
1 parent ff392f3 commit 50082dc
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 7 deletions.
3 changes: 3 additions & 0 deletions OAUTH2/DAUM.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ public function Profile () {
$http = new \HTTPRelay ($header);
$buf = $http->fetch ($this->reqUser);

if ( ! $buf )
$this->error (sprintf ('[OAUTH2] Failed get user profile for %s', __CLASS__));

#stdClass Object
#(
# [code] => 200
Expand Down
3 changes: 3 additions & 0 deletions OAUTH2/FACEBOOK.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ public function Profile () {
$http = new \HTTPRelay ();
$buf = $http->fetch ($url);

if ( ! $buf )
$this->error (sprintf ('[OAUTH2] Failed get user profile for %s', __CLASS__));

#stdClass Object
#(
# [id] => 사용자 확인값
Expand Down
3 changes: 3 additions & 0 deletions OAUTH2/GITHUB.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ public function Profile () {
$http = new \HTTPRelay ($header);
$buf = $http->fetch ($this->reqUser);

if ( ! $buf )
$this->error (sprintf ('[OAUTH2] Failed get user profile for %s', __CLASS__));

$r = json_decode ($buf);

$re = array (
Expand Down
4 changes: 4 additions & 0 deletions OAUTH2/GOOGLE.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ public function Profile () {
$header = array ('Authorization' => $req);
$http = new \HTTPRelay ($header);
$buf = $http->fetch ($this->reqUser);

if ( ! $buf )
$this->error (sprintf ('[OAUTH2] Failed get user profile for %s', __CLASS__));

$r = json_decode ($buf);

$re = array (
Expand Down
3 changes: 3 additions & 0 deletions OAUTH2/KAKAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ public function Profile () {
$http = new \HTTPRelay ($header);
$buf = $http->fetch ($this->reqUser);

if ( ! $buf )
$this->error (sprintf ('[OAUTH2] Failed get user profile for %s', __CLASS__));

#stdClass Object
#(
# [kaccount_email]
Expand Down
3 changes: 3 additions & 0 deletions OAUTH2/NAVER.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ public function Profile () {
$http = new \HTTPRelay ($header);
$buf = $http->fetch ($this->reqUser);

if ( ! $buf )
$this->error (sprintf ('[OAUTH2] Failed get user profile for %s', __CLASS__));

$xml = simplexml_load_string ($buf);
if ( $xml->result->resultcode != '00' )
$this->error ($r->result->message);
Expand Down
16 changes: 9 additions & 7 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<active>yes</active>
</lead>
<date>2018-01-29</date>
<time>01:20:43</time>
<time>02:25:10</time>
<version>
<release>1.0.7</release>
<api>1.0.0</api>
Expand All @@ -23,16 +23,17 @@
</stability>
<license uri="http:https://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>* Facebook graph api 버전 업데이트 (v2.6 to v2.11)
* Profile 못 가져올 경우에 대한 방어 코드 추가
</notes>
<contents>
<dir name="/">
<file role="php" md5sum="3d0e7761f13fd06fc86f5981953b69e7" name="OAUTH2.php" />
<file role="php" md5sum="2b97dbfb668cd1dd98bbb6dd33c95ba3" name="OAUTH2/DAUM.php" />
<file role="php" md5sum="e9bc74e63549ddddfe333b3695cd95c0" name="OAUTH2/FACEBOOK.php" />
<file role="php" md5sum="f93341015cc35768d5cdb23de0df74fa" name="OAUTH2/GITHUB.php" />
<file role="php" md5sum="a822175b14c492fe429aecda3e9ce9a1" name="OAUTH2/GOOGLE.php" />
<file role="php" md5sum="bef51d54d15092692683fbd91e51b0f6" name="OAUTH2/KAKAO.php" />
<file role="php" md5sum="48b7a2918bc8ce80626c71e0e6076ecb" name="OAUTH2/NAVER.php" />
<file role="php" md5sum="5b297f26ea6ac389801998f38e088d0f" name="OAUTH2/DAUM.php" />
<file role="php" md5sum="4ef699debb3961d9552d3a2926ef0dfa" name="OAUTH2/FACEBOOK.php" />
<file role="php" md5sum="cb7bce2ff8590e0121021b45b033d6f3" name="OAUTH2/GITHUB.php" />
<file role="php" md5sum="ec25fe3edb0dc7e82f6a4556cb1f0159" name="OAUTH2/GOOGLE.php" />
<file role="php" md5sum="03bceb564fb518743a8c48e7a781d78e" name="OAUTH2/KAKAO.php" />
<file role="php" md5sum="4292b6c8b561a5d13aad11192137fd77" name="OAUTH2/NAVER.php" />
<file role="php" md5sum="f4944e1961b5d6ea925b0b38f3e1430f" name="OAUTH2/logout-agree.template" />
<file role="php" md5sum="318f0bc144dd8ad28be690f6e9ff2af3" name="OAUTH2/logout-no-auto.template" />
<file role="php" md5sum="3f38dd2c30e3a33dca52a253908c96a6" name="OAUTH2/logout.template" />
Expand Down Expand Up @@ -73,6 +74,7 @@
<license uri="http:https://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>
* Facebook graph api 버전 업데이트 (v2.6 to v2.11)
* Profile 못 가져올 경우에 대한 방어 코드 추가
</notes>
</release>
<release>
Expand Down
2 changes: 2 additions & 0 deletions package.xml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</stability>
<license uri="http:https://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>* Facebook graph api 버전 업데이트 (v2.6 to v2.11)
* Profile 못 가져올 경우에 대한 방어 코드 추가
</notes>
<contents>
<dir name="/">
Expand Down Expand Up @@ -73,6 +74,7 @@
<license uri="http:https://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>
* Facebook graph api 버전 업데이트 (v2.6 to v2.11)
* Profile 못 가져올 경우에 대한 방어 코드 추가
</notes>
</release>
<release>
Expand Down

0 comments on commit 50082dc

Please sign in to comment.