p2 / security-bundle
增强 Symfony SecurityBundle
1.0.0
2013-07-15 18:15 UTC
Requires
- php: >=5.3.3
- symfony/framework-bundle: 2.3.*
- symfony/security-bundle: 2.3.*
This package is not auto-updated.
Last update: 2024-09-14 14:21:18 UTC
README
安装
"require": {
"p2/security-bundle": "~1.0"
}
配置
p2_security:
document: Acme\UserBundle\Document\User # The user document class
manager: @user_manager # The service id of your user manager
encoder: sha256 # The encoder algorithm to use
使用
只需通过 P2 安全用户类扩展您的用户文档。
<?php
namespace Acme\BlogBundle\Document;
use P2\Bundle\SecurityBundle\Security\User as SecurityUser;
class User extends SecurityUser
{
// ...
}
实现 UserManagerInterface
<?php
namespace Acme\BlogBundle\Repository;
use P2\Bundle\SecurityBundle\Security\UserManagerInterface;
class UserRepository extends DocumentRepository implements UserManagerInterface
{
// ...
}