public function authenticate()
    {
        try {
            $claims = $this->_infoCard->process($this->getXmlToken());
        } catch(Exception $e) {
            return new Zend_Auth_Result(Zend_Auth_Result::FAILURE , null, array('Exception Thrown',
                                                                                $e->getMessage(),
                                                                                $e->getTraceAsString(),
                                                                                serialize($e)));
        }

        if(!$claims->isValid()) {
            switch($claims->getCode()) {
                case Zend_infoCard_Claims::RESULT_PROCESSING_FAILURE:
                    return new Zend_Auth_Result(
                        Zend_Auth_Result::FAILURE,
                        $claims,
                        array(
                            'Processing Failure',
                            $claims->getErrorMsg()
                        )
                    );
                    break;
                case Zend_InfoCard_Claims::RESULT_VALIDATION_FAILURE:
                    return new Zend_Auth_Result(
                        Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID,
                        $claims,
                        array(
                            'Validation Failure',
                            $claims->getErrorMsg()
                        )
                    );
                    break;
                default:
                    return new Zend_Auth_Result(
                        Zend_Auth_Result::FAILURE,
                        $claims,
                        array(
                            'Unknown Failure',
                            $claims->getErrorMsg()
                        )
                    );
                    break;
            }
        }

        return new Zend_Auth_Result(
            Zend_Auth_Result::SUCCESS,
            $claims
        );
    }
public function authenticate()
    {
        try {
            $claims = $this->_infoCard->process($this->getXmlToken());
        } catch(Exception $e) {
            return new Zend_Auth_Result(Zend_Auth_Result::FAILURE , null, array('Exception Thrown',
                                                                                $e->getMessage(),
                                                                                $e->getTraceAsString(),
                                                                                serialize($e)));
        }

        if(!$claims->isValid()) {
            switch($claims->getCode()) {
                case Zend_infoCard_Claims::RESULT_PROCESSING_FAILURE:
                    return new Zend_Auth_Result(
                        Zend_Auth_Result::FAILURE,
                        $claims,
                        array(
                            'Processing Failure',
                            $claims->getErrorMsg()
                        )
                    );
                    break;
                case Zend_InfoCard_Claims::RESULT_VALIDATION_FAILURE:
                    return new Zend_Auth_Result(
                        Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID,
                        $claims,
                        array(
                            'Validation Failure',
                            $claims->getErrorMsg()
                        )
                    );
                    break;
                default:
                    return new Zend_Auth_Result(
                        Zend_Auth_Result::FAILURE,
                        $claims,
                        array(
                            'Unknown Failure',
                            $claims->getErrorMsg()
                        )
                    );
                    break;
            }
        }

        return new Zend_Auth_Result(
            Zend_Auth_Result::SUCCESS,
            $claims
        );
    }
public function authenticate ( ) { try { $ claims = $ this -> _infoCard -> process ( $ this -> getXmlToken ( ) ) ; } catch ( Exception $ e ) { return new Zend_Auth_Result ( Zend_Auth_Result :: FAILURE , null , array ( 'Exception Thrown' , $ e -> getMessage ( ) , $ e -> getTraceAsString ( ) , serialize ( $ e ) ) ) ; } if ( ! $ claims -> isValid ( ) ) { switch ( $ claims -> getCode ( ) ) { case Zend_infoCard_Claims :: RESULT_PROCESSING_FAILURE : return new Zend_Auth_Result ( Zend_Auth_Result :: FAILURE , $ claims , array ( 'Processing Failure' , $ claims -> getErrorMsg ( ) ) ) ; break ; case Zend_InfoCard_Claims :: RESULT_VALIDATION_FAILURE : return new Zend_Auth_Result ( Zend_Auth_Result :: FAILURE_CREDENTIAL_INVALID , $ claims , array ( 'Validation Failure' , $ claims -> getErrorMsg ( ) ) ) ; break ; default : return new Zend_Auth_Result ( Zend_Auth_Result :: FAILURE , $ claims , array ( 'Unknown Failure' , $ claims -> getErrorMsg ( ) ) ) ; break ; } } return new Zend_Auth_Result ( Zend_Auth_Result :: SUCCESS , $ claims ) ; }
Authenticates the XML token

@return Zend_Auth_Result The result of the authentication
Authenticates the XML token