From 4b2adf55d8829f56adcff75d68e75b6481685f74 Mon Sep 17 00:00:00 2001 From: xia0ta0 Date: Wed, 17 Jul 2013 13:54:21 +0800 Subject: [PATCH] + add sso module. --- module/sso/control.php | 36 ++++++++++++++++++++++++++++++++++++ module/sso/model.php | 5 +++++ 2 files changed, 41 insertions(+) create mode 100644 module/sso/control.php create mode 100644 module/sso/model.php diff --git a/module/sso/control.php b/module/sso/control.php new file mode 100644 index 0000000000..d9d2e69ede --- /dev/null +++ b/module/sso/control.php @@ -0,0 +1,36 @@ +post->account) $account = $this->post->account; + if($this->get->account) $account = $this->get->account; + if($this->post->password) $password = $this->post->password; + if($this->get->password) $password = $this->get->password; + } + + $user = $this->loadModel('user')->identify($account, $password); + if($user) + { + $response['status'] = 'success'; + $response['data'] = json_encode($user); + $this->send($response); + } + + $response['status'] = 'fail'; + $response['data'] = 'auth failed.'; + $this->send($response); + } + + public function depts($key) + { + } + + public function users($key) + { + } +} diff --git a/module/sso/model.php b/module/sso/model.php new file mode 100644 index 0000000000..8cf7c30425 --- /dev/null +++ b/module/sso/model.php @@ -0,0 +1,5 @@ +