ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 12681


Ignore:
Timestamp:
Aug 17, 2009, 8:55:48 PM (10 years ago)
Author:
ebihara
Message:

#4243:added support for OpenID SREG as an OpenID provider

Location:
OpenPNE3/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/pc_frontend/modules/OpenID/actions/actions.class.php

    r10003 r12681  
    102102    require_once 'Auth/OpenID/Server.php';
    103103    require_once 'Auth/OpenID/FileStore.php';
     104    require_once 'Auth/OpenID/SReg.php';
     105    require_once 'Auth/OpenID/AX.php';
    104106
    105107    $info = unserialize($_SESSION['request']);
     
    121123      unset($_SESSION['request']);
    122124      $server = new Auth_OpenID_Server(new Auth_OpenID_FileStore(sfConfig::get('sf_cache_dir')), $info->identity);
    123       $response = $server->encodeResponse($info->answer(true, null, $reqUrl));
     125      $response = $info->answer(true, null, $reqUrl);
     126
     127      $sregRequest = Auth_OpenID_SRegRequest::fromOpenIDRequest($info);
     128      if ($sregRequest)
     129      {
     130        $userData = array(
     131          'nickname' => $this->getUser()->getMember()->name,
     132        );
     133        $sregResp = Auth_OpenID_SRegResponse::extractResponse($sregRequest, $userData);
     134        $response->addExtension($sregResp);
     135      }
     136
     137      $response = $server->encodeResponse($response);
    124138      $this->writeResponse($response);
    125139    }
  • OpenPNE3/trunk/lib/widget/opWidgetFormInputHiddenNextUri.class.php

    r12516 r12681  
    2525    $request = sfContext::getInstance()->getRequest();
    2626
    27     $params = http_build_query($request->getGetParameters());
    2827    $value = $routing->getCurrentInternalUri();
    29     if ($params)
     28    if ($_SERVER['QUERY_STRING'])
    3029    {
    3130      if (false !== strpos($value, '?'))
     
    3837      }
    3938
    40       $value .= str_replace('openid_', 'openid.', $params);
     39      $value .= $_SERVER['QUERY_STRING'];
    4140    }
    4241
Note: See TracChangeset for help on using the changeset viewer.