Repository: airavata-php-gateway Updated Branches: refs/heads/master 09d8d5bcf -> 8657b3a57
fixing url redirection issue Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/651fe576 Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/651fe576 Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/651fe576 Branch: refs/heads/master Commit: 651fe57651f08df43d39076b0b5d6a6b06cbb99b Parents: 66438b0 Author: Supun Nakandala <[email protected]> Authored: Sat Sep 5 20:48:08 2015 +0530 Committer: Supun Nakandala <[email protected]> Committed: Sat Sep 5 20:48:08 2015 +0530 ---------------------------------------------------------------------- app/controllers/AccountController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/651fe576/app/controllers/AccountController.php ---------------------------------------------------------------------- diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index 99e3e8e..7185af9 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -84,11 +84,15 @@ class AccountController extends BaseController public function oauthCallback() { if (!isset($_GET["code"])) { - return View::make('home'); + return Redirect::to('home'); } $code = $_GET["code"]; $response = WSIS::getOAuthToken($code); + if(!isset($response->access_token)){ + return Redirect::to('home'); + } + $accessToken = $response->access_token; $refreshToken = $response->refresh_token; $expirationTime = time() + $response->expires_in - 5; //5 seconds safe margin
