private function _authenticate($credentials)
    {
        try {
            $response = $this->getService('com:people.authentication.response');
            dispatch_plugin('authentication.onAuthenticate', array(
                                'credentials' => $credentials,
                                'response' => $response
                            ));

            if ($response->status === ComPeopleAuthentication::STATUS_SUCCESS) {
                return true;
            }

        } catch (RuntimeException $e) {
            //only throws exception if we are using JSON format
            //otherwise let the current app handle it
            if (AnRequest::format() == 'json') {
                throw $e;
            }
        }

        return false;
    }
private function _authenticate($credentials)
    {
        try {
            $response = $this->getService('com:people.authentication.response');
            dispatch_plugin('authentication.onAuthenticate', array(
                                'credentials' => $credentials,
                                'response' => $response
                            ));

            if ($response->status === ComPeopleAuthentication::STATUS_SUCCESS) {
                return true;
            }

        } catch (RuntimeException $e) {
            //only throws exception if we are using JSON format
            //otherwise let the current app handle it
            if (AnRequest::format() == 'json') {
                throw $e;
            }
        }

        return false;
    }
private function _authenticate ( $ credentials ) { try { $ response = $ this -> getService ( 'com:people.authentication.response' ) ; dispatch_plugin ( 'authentication.onAuthenticate' , array ( 'credentials' => $ credentials , 'response' => $ response ) ) ; if ( $ response -> status === ComPeopleAuthentication :: STATUS_SUCCESS ) { return true ; } } catch ( RuntimeException $ e ) { //only throws exception if we are using JSON format //otherwise let the current app handle it if ( AnRequest :: format ( ) == 'json' ) { throw $ e ; } } return false ; }
Authenticate the credentials

@param array array('username' => 'janesmith', 'password' => 'somethingsecure')
@return boolean TRUE if authentication passes
Authenticate the credentials