p2/security-bundle

增强 Symfony SecurityBundle

安装: 31

依赖: 0

建议者: 0

安全: 0

星标: 3

关注者: 2

分支: 0

开放问题: 0

类型:symfony-bundle

1.0.0 2013-07-15 18:15 UTC

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
{
    // ...
}