Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 959529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:02:35+00:00 2026-05-16T01:02:35+00:00

I am using the Zend_OpenId_Consumer to provide OpenID access, the login is working fine,

  • 0

I am using the Zend_OpenId_Consumer to provide OpenID access, the login is working fine, but when I call verify() I am recieving the error

`Wrong openid.return_to 'http://[host]/user/openid' != 'http://[host]/user/openid?[OpenIdResponse]

The issue as far as I can see is that the verify method is comparing the URL without the query part to the entire URL which includes all of the OpenID response information. It gets this url from Zend_OpenId::selfUrl()

I’m using the verify code from the doc pages

$consumer = new Zend_OpenId_Consumer();

if($this->_request->getParam('openid_mode')) {

    $id = $this->_request->getParam('openid_claimed_id');

    if($this->_request->getParam('openid_mode') == 'id_res') {

        if($consumer->verify($this->_request->getParams(),$id)) {
            $status = 'VALID ' . $id;
        }
        else {
               $status = 'INVALID ' . $id;
        }

    }
    elseif($this->_request->getParam('openid_mode') == 'cancel') {
       $status = 'CANCELLED';
    }
}

Am I doing something wrong here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:02:35+00:00Added an answer on May 16, 2026 at 1:02 am

    perhaps this is helpful

    Integration with Zend_Controller

    Finally a couple of words about
    integration into Model-View-Controller
    applications: such Zend Framework
    applications are implemented using the
    Zend_Controller class and they use
    objects of the
    Zend_Controller_Response_Http class to
    prepare HTTP responses and send them
    back to the user’s web browser.
    Zend_OpenId_Consumer doesn’t provide
    any GUI capabilities but it performs
    HTTP redirections on success of
    Zend_OpenId_Consumer::login and
    Zend_OpenId_Consumer::check. These
    redirections may work incorrectly or
    not at all if some data was already
    sent to the web browser. To properly
    perform HTTP redirection in MVC code
    the real Zend_Controller_Response_Http
    should be sent to
    Zend_OpenId_Consumer::login or
    Zend_OpenId_Consumer::check as the
    last argument.

    zend.openid.consumer

    strange, i’ve just tested OpenId_Consumer on my localserver with ZF 1.10.3…
    no problem at all

    my Action

       public function openidAction() {
          $this->view->status = "";
          if ($this->getRequest()->isPost()) {
             $consumer = new Zend_OpenId_Consumer();
             if (!$consumer->login($this->getRequest()->getParam('openid_identifier'))) {
                $this->view->status = "OpenID login failed.";
             }
          } else if ($this->getRequest()->getParam('openid_mode')) {
             if ($this->getRequest()->getParam('openid_mode') == "id_res") {
                $consumer = new Zend_OpenId_Consumer();
                if ($consumer->verify($this->getRequest()->getParams(), $id)) {
                   $this->view->status = "VALID " . htmlspecialchars($id);
                } else {
                   $this->view->status = "INVALID " . htmlspecialchars($id);
                }
             } else if ($_GET['openid_mode'] == "cancel") {
                $this->view->status = "CANCELLED";
             }
          }
       }
    

    my View

    <p><?php echo "{$this->status}" ?></p>
    <form method="post">
       <fieldset>
          <legend>OpenID Login</legend>
          <input type="text" name="openid_identifier" value=""/>
          <input type="submit" name="openid_action" value="login"/>
       </fieldset>
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I started using Zend_Paginator, it works everything fine but I noticed that there is
Using Zend Paginator and the paginator cache works fine, but the same cached pages
I am using zend_feed for feed generation, here is the code, it working fine,
I am using PHP and the codeigniter framework for a project I am working
I just started learning Zend. I managed to get the basic working (using zf
I am using Zend Dom component to parse some Html blocks, but i have
I'm using the Zend framework and the openid selector from http://code.google.com/p/openid-selector/ - however I
I'm using Zend_Auth to store session values after login. My question is: let's say
I am using sfOpenID plugin for Symfony, which doesn't support OpenID 2.0. That means,
I'm using the Zend OpenID library found here . I see there is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.