Catalyst + 外部認証API
今作ってるサービス。
use Catalyst qw/
...
Authentication
Authentication::Credential::Password
Authentication::Credential::OpenID
Authentication::Credential::TypeKey
Authentication::Credential::Hatena
Authentication::Credential::JugemKey
+MyApp::UserStore
...
/;
MyApp::UserStore は A::Store::DBIC のちょっとしたサブクラスで、Cred::Password のときは auto_create_user しないようにしただけのもの。
最近の Store::DBIC の auto_create_user 機能つかうと外部認証使うサービス簡単に作れる。
Cred::Password 使わないなら (独自ユーザーを使わないなら) 、Store::DBIC そのまま使えばいける。
すばらしいなー。
リリースしたらちゃんとした記事を書きたい。