AmyProjectController::on_authenticate PHP Method

on_authenticate() public method

public on_authenticate ( $pars = [] )
    public function on_authenticate($pars = array())
    {
        $username = $pars['username'];
        $password = $pars['password'];
        try {
            $ticket = $this->authenticateUser($username, $password);
            if (!$ticket) {
                throw new Exception('Empty or invalid ticket returned.');
            }
            self::setResult($ticket);
        } catch (Exception $e) {
            self::raiseError("Unauthenticated: " . $e->getMessage());
        }
    }