OpenID :: 0.3.1 の対応

PEAR::OpenID-0.3.1

0.1 からちょこちょこ変わりましたね。

全体は変わらないけど。ユーザーのセッション管理も新しくしたら疲れた~~
けどとりあえず対応完了です。

クラス化されて、なんか見やすくなったなぁと
リクエスト作るところはこんな感じで見やすくなってます↓

      $or = new OpenID_RelyingParty($this->returnTo, $this->realm, $provider);
      $authRequest = $or->prepare();
      if(!$authRequest){throw new Exception ('authRequest error: not a valid');}
      // SREG
      $sreg = new OpenID_Extension_SREG11(OpenID_Extension::REQUEST);
      $sreg->set('required', 'email');
      $sreg->set('optional', 'nickname,gender,fullname');
      $authRequest->addExtension($sreg);

      $ax = new OpenID_Extension_AX(OpenID_Extension::REQUEST);
      $ax->set('type.image', 'http://axschema.org/media/image/default');
      $ax->set('type.email', 'http://axschema.org/contact/email');
      $ax->set('type.nickname', 'http://axschema.org/namePerson/friendly');
      $ax->set('type.gender', 'http://axschema.org/namePerson/gender');
      $ax->set('type.firstname', 'http://axschema.org/namePerson/first');
      $ax->set('type.lastname', 'http://axschema.org/namePerson/last');
      $ax->set('type.country', 'http://axschema.org/contact/country/home');
      $ax->set('type.language', 'http://axschema.org/pref/language');
      $ax->set('mode', 'fetch_request');
      $ax->set('required', 'image,nickname,gender,email,firstname,lastname,language,country');
      $authRequest->addExtension($ax);

This entry was posted on 月曜日, 1月 10th, 2011 at 5:34 AM and is filed under blog. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。