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 @@ +