unknownplace.org

前の日 | 最新のメモ | 次の日

# 2007-04-09

Catalyst + 外部認証API

今作ってるサービス。

use Catalyst qw/
    ...
    Authentication
    Authentication::Credential::Password
    Authentication::Credential::OpenID
    Authentication::Credential::TypeKey
    Authentication::Credential::Hatena
    Authentication::Credential::JugemKey
    +MyApp::UserStore
    ...
    /;

MyApp::UserStoreA::Store::DBIC のちょっとしたサブクラスで、Cred::Password のときは auto_create_user しないようにしただけのもの。

最近の Store::DBICauto_create_user 機能つかうと外部認証使うサービス簡単に作れる。

Cred::Password 使わないなら (独自ユーザーを使わないなら) 、Store::DBIC そのまま使えばいける。

すばらしいなー。

リリースしたらちゃんとした記事を書きたい。


comments


Fork me on GitHub