Archive for 1月, 2011

 

Open ID : associate type ASSOC_TYPE_HMAC_SHA1 これも

1月 23rd, 2011

ちょとこのversionと暗号化の組み合わせは何でしょう。 まぁライブラリが正解とは言えないので良いのです。 修正しました。やっとmixiでログイン成功~ if (OpenID::$versionMap[$version] == OpenID::NS_2_0) { $this->message->set(‘openid.ns’, OpenID::NS_2_0); if(preg_match(‘/mixi.jp/’,$this->opEndpointURL)){ $this->message->set(‘openid.assoc_type’, self::ASSOC_TYPE_HMAC_SHA1); $this->message->set(‘openid.session_type’, self::SESSION_TYPE_DH_SHA1); }else{ $this->message->set(‘openid.assoc_type’, self::ASSOC_TYPE_HMAC_SHA256); $this->message->set(‘openid.session_type’, self::SESSION_TYPE_DH_SHA256); }

Read full article | コメントは受け付けていません。

OpenID : session_type DH_SHA1 or DH-SHA256 ? mixi.jpの罠 ?

1月 22nd, 2011

PearのOpenIDライブラリを使っているのですが、 mixi.jp の OpenIDを利用したところ以下のエラーが返された。 “Missing dh_server_public parameter in association response” https://mixi.jp/openid_server.pl データは取得出来ていたけど、dh_server_publicがかえってこなかった。。。 ようやく原因がわかりました。。。 session_typeには、 no-encryption DH-SHA1 DH-SHA256 の3つがあるのですが、sslのときは、当然利用が必要です。 mixi.jpはhttps://につなぎに行くのですが versionが http://specs.openid.net/auth/2.0/server のため OpenID_Association_Request のconstruct内で versionから session_type = DH-SHA256 と設定されました。 残念ながら mixi.jpはDH-SHA256では、 dh_server_public enc_mac_key が返されませんでした ; o ; 仕方ないのでmixiのときは、 DH_SHA1 にして無事認証完了^-^; // Set defaults $this->message->set(‘openid.mode’, OpenID::MODE_ASSOCIATE); if (OpenID::$versionMap[$version] == OpenID::NS_2_0) { $this->message->set(‘openid.ns’, OpenID::NS_2_0); $this->message->set(‘openid.assoc_type’, self::ASSOC_TYPE_HMAC_SHA256); +++ if(preg_match(‘/mixi.jp/’,$this->opEndpointURL)){ […]

Read full article | コメントは受け付けていません。

Skype for android (unlocked?)

1月 10th, 2011

http://www.lifehacker.jp/2010/10/101008skype_for_android.html http://www.droidforums.net/forum/xeudoxus/78843-apks-unlocked-apps.html -Skype (Unlocked for 3G calling in the US) Skype.apkを入れました。 HTC Ariaは問題なく電話で来ました^-^。 通信料はキャリアにお問い合わせを~

Read full article | コメントは受け付けていません。

OpenID :: 0.3.1 の対応

1月 10th, 2011

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’); […]

Read full article | コメントは受け付けていません。

変なエラーメモ date timezone

1月 9th, 2011

PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Asia/Tokyo’ for ‘JST/9.0/no DST’ instead […]

Read full article | コメントは受け付けていません。

Website Thumbnails | サムネイルはこちらで。

1月 9th, 2011

http://www.websnapr.com/ から登録して使うか Website Thumbnails. で使う場合は http://www.iwebtool2.com/img/?r=<掲載URL>&domain=<サムネイルにしたいURL> これで出力されるURLを利用するだけです。

Read full article | コメントは受け付けていません。

airbnb.com | P2P C2C 宿泊予約,週末部屋が空いてるので貸すよ!

1月 9th, 2011

http://airbnb.com/ Find a place to stay. 誰でも部屋を貸せます。ホテルじゃなくても、週末部屋が空いている方はどうぞ!という形です。 将来はほとんどのものがC2Cになるという話はどこにでも出てきます。Pのスキルが上がるほど加速していきます。 中間マージンをもらう仕事はすべてシステムに置き換えられるのです。(もちろんすべてではないですが) 東京は人気らしいので貸してみては如何でしょう? Airbnbは2010年に800%の成長–その締めくくりは上出来の紹介ビデオ. この紹介動画は良いですね

Read full article | コメントは受け付けていません。

OpenID :: 0.3.1

1月 9th, 2011

OpenID 0.3.1 引用元: OpenID :: 0.3.1. # pear install OpenID-0.3.1 Failed to download pear/Crypt_DiffieHellman within preferred state “stable”, latest release is version 0.2.5, stability “beta”, use “channel://pear.php.net/Crypt_DiffieHellman-0.2.5″ to install Failed to download pear/Services_Yadis within preferred state “stable”, latest release is version 0.5.1, stability “beta”, use “channel://pear.php.net/Services_Yadis-0.5.1″ to install pear/OpenID requires package “pear/Crypt_DiffieHellman” pear/OpenID requires package […]

Read full article | コメントは受け付けていません。

Googleから電話が

1月 6th, 2011

gmailの登録で、google 確認コードという確認で電話番号を入れると電話がかかってきてコードを教えてくれました。

Read full article | コメントは受け付けていません。

screen install

1月 5th, 2011

# yum install screen Installed: screen.x86_64 0:4.0.3-1.el5_4.1 Complete! チカチカスルノデ以下を設定 ~/.screenrc vbell off

Read full article | コメントは受け付けていません。