Skip to content
Permalink
Browse files
minor updated
  • Loading branch information
scnakandala committed Jun 28, 2017
1 parent 712cd2f commit f453dd2816bc57334d6c89aea9a209cf54948d76
Showing 1 changed file with 6 additions and 8 deletions.
@@ -120,9 +120,9 @@ public function loginSubmit()
$response = Keycloak::authenticate($username, $password);
if(!isset($response->access_token)){
if (Keycloak::isUpdatePasswordRequired($username)) {
return Redirect::to("login?status=failed")->with("update-password-required", true);
return Redirect::to("login", array('status'=>'failed'))->with("update-password-required", true);
} else {
return Redirect::to("login?status=failed")->with("invalid-credentials", true);
return Redirect::to("login", array('status'=>'failed'))->with("invalid-credentials", true);
}
}

@@ -173,11 +173,10 @@ public function loginSubmit()
return $this->initializeWithAiravata($username, $userEmail, $firstName, $lastName);
}

$status = '?status=ok&code=' . $accessToken;
if(Session::has("admin") || Session::has("admin-read-only")){
return Redirect::to("admin/dashboard" . $status);
return Redirect::to("admin/dashboard", array('status'=>'ok', 'code'=>$accessToken));
}else{
return Redirect::to("account/dashboard" . $status);
return Redirect::to("account/dashboard", array('status'=>'ok', 'code'=>$accessToken));
}
}

@@ -245,11 +244,10 @@ public function oauthCallback()
return $this->initializeWithAiravata($username, $userEmail, $firstName, $lastName);
}

$status = '?status=ok&code=' . $accessToken;
if(Session::has("admin") || Session::has("admin-read-only")){
return Redirect::to("admin/dashboard" . $status);
return Redirect::to("admin/dashboard", array('status'=>'ok', 'code'=>$accessToken));
}else{
return Redirect::to("account/dashboard" . $status);
return Redirect::to("account/dashboard", array('status'=>'ok', 'code'=>$accessToken));
}
}

0 comments on commit f453dd2

Please sign in to comment.