code/control/KapostService.php
protected function authenticate($username, $password) {
        $authenticator=$this->config()->authenticator_class;
        
        $member=$authenticator::authenticate(array(
                                                $this->config()->authenticator_username_field=>$username,
                                                'Password'=>$password
                                            ));
        
        return (!empty($member) && $member!==false && $member->exists()==true && Permission::check('KAPOST_API_ACCESS', 'any', $member));
    }
protected function authenticate($username, $password) {
        $authenticator=$this->config()->authenticator_class;
        
        $member=$authenticator::authenticate(array(
                                                $this->config()->authenticator_username_field=>$username,
                                                'Password'=>$password
                                            ));
        
        return (!empty($member) && $member!==false && $member->exists()==true && Permission::check('KAPOST_API_ACCESS', 'any', $member));
    }
protected function authenticate ( $ username , $ password ) { $ authenticator = $ this -> config ( ) -> authenticator_class ; $ member = $ authenticator :: authenticate ( array ( $ this -> config ( ) -> authenticator_username_field => $ username , 'Password' => $ password ) ) ; return ( ! empty ( $ member ) && $ member !== false && $ member -> exists ( ) == true && Permission :: check ( 'KAPOST_API_ACCESS' , 'any' , $ member ) ) ; }
Checks the authentication of the api request
@param string $username Username to look up
@param string $password Password to match against
@return bool Returns boolean true if authentication passes false otherwise
Checks the authentication of the api request