Auth_Container_Multipleおもしろそう
PEARのAuth_Container_Multipleがおもしろそう!
メモメモ。
- 複数のコンテナを利用可能
- コンテナのどれかで認証成功→OK、コンテナのすべてで認証失敗→NG
設定例(※ソースコード内のコメントから引用)
<?php $options = array( array( 'type' => 'DB', 'options' => array('dsn' => 'mysql://user:password@localhost/database'), ), array( 'type' => 'Array', 'options' => array('cryptType' => 'md5', 'users' => array('admin' => md5('password'))), ), ); $auth = new Auth('Multiple', $options);
http://pear.php.net/package/Auth/docs/latest/Auth/Auth_Container_Multiple.html