saml issue solved

This commit is contained in:
Gowtham M 2026-05-12 14:22:27 +05:30
parent cfdbdebe16
commit d0da0d7f96

View File

@ -53,7 +53,7 @@ class SamlController extends BaseController
$email = $this->request->getGet('email'); $email = $this->request->getGet('email');
if (! $email) { if (! $email) {
return $this->redirectToFrontendSso([ return $this->response->setStatusCode(400)->setJSON([
'status' => 'failed', 'status' => 'failed',
'code' => 400, 'code' => 400,
'data' => '', 'data' => '',
@ -65,7 +65,7 @@ class SamlController extends BaseController
$email = trim((string) $email); $email = trim((string) $email);
$at = strrchr($email, '@'); $at = strrchr($email, '@');
if ($at === false) { if ($at === false) {
return $this->redirectToFrontendSso([ return $this->response->setStatusCode(400)->setJSON([
'status' => 'failed', 'status' => 'failed',
'code' => 400, 'code' => 400,
'data' => '', 'data' => '',
@ -77,13 +77,16 @@ class SamlController extends BaseController
$domain = strtolower(substr($at, 1)); $domain = strtolower(substr($at, 1));
// dd($domain);
$model = new SamlClientModel(); $model = new SamlClientModel();
$samlClient = $model->getByDomain($domain); $samlClient = $model->getByDomain($domain);
// dd($samlClient);
if (! $samlClient) { if (! $samlClient) {
return $this->redirectToFrontendSso([ return $this->response->setStatusCode(404)->setJSON([
'status' => 'failed', 'status' => 'failed',
'code' => 404, 'code' => 404,
'data' => '', 'data' => '',
@ -96,7 +99,7 @@ class SamlController extends BaseController
$auth = $this->getSamlAuth($samlClient['id']); $auth = $this->getSamlAuth($samlClient['id']);
} catch (\Throwable $e) { } catch (\Throwable $e) {
return $this->redirectToFrontendSso([ return $this->response->setStatusCode(500)->setJSON([
'status' => 'failed', 'status' => 'failed',
'code' => 500, 'code' => 500,
'data' => '', 'data' => '',