public function login($username = null, $password = null)
    {
        if (!isset($username) && isset($_POST['username'])) {
            $username = $_POST['username'];
        }
        if (!isset($password) && isset($_POST['password'])) {
            $password = $_POST['password'];
        }

        $result = $this->request('POST', 'login', compact('username', 'password'));
        $this->userinfo = $result;

        return $this->userinfo;
    }
public function login($username = null, $password = null)
    {
        if (!isset($username) && isset($_POST['username'])) {
            $username = $_POST['username'];
        }
        if (!isset($password) && isset($_POST['password'])) {
            $password = $_POST['password'];
        }

        $result = $this->request('POST', 'login', compact('username', 'password'));
        $this->userinfo = $result;

        return $this->userinfo;
    }
public function login ( $ username = null , $ password = null ) { if ( ! isset ( $ username ) && isset ( $ _POST [ 'username' ] ) ) { $ username = $ _POST [ 'username' ] ; } if ( ! isset ( $ password ) && isset ( $ _POST [ 'password' ] ) ) { $ password = $ _POST [ 'password' ] ; } $ result = $ this -> request ( 'POST' , 'login' , compact ( 'username' , 'password' ) ) ; $ this -> userinfo = $ result ; return $ this -> userinfo ; }
Log the client in at the SSO server.

Only brokers marked trused can collect and send the user's credentials. Other brokers should omit $username and
$password.

@param string $username
@param string $password
@return array  user info
@throws Exception if login fails eg due to incorrect credentials
Log the client in at the SSO server .