Newscoop\Services\Auth\SocialAuthService::authenticate PHP Method

authenticate() public method

Perform authentication attempt
public authenticate ( ) : Zend_Auth_Result
return Zend_Auth_Result
    public function authenticate()
    {
        $identity = $this->em->find('Newscoop\\Entity\\UserIdentity', array('provider' => $this->provider, 'provider_user_id' => $this->providerUserId));
        if (empty($identity)) {
            return new \Zend_Auth_Result(\Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND, NULL);
        }
        return new \Zend_Auth_Result(\Zend_Auth_Result::SUCCESS, $identity->getUser()->getId());
    }