PHPackages                             ansnap/ans-user-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ansnap/ans-user-bundle

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

ansnap/ans-user-bundle
======================

023PHP

Since Apr 14Pushed 12y ago1 watchersCompare

[ Source](https://github.com/ansnap/ANSUserBundle)[ Packagist](https://packagist.org/packages/ansnap/ans-user-bundle)[ RSS](/packages/ansnap-ans-user-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

ANSUserBundle
=============

[](#ansuserbundle)

Installation
------------

[](#installation)

- Security

```
# app/config/security.yml

security:
    firewalls:
        main:
            pattern:	^/
            anonymous:	~
            form_login:
                login_path:	login
                check_path:	login_check
                # field names for the username and password fields
                username_parameter: _email
                password_parameter: _password
                #use_referer:	true
            logout:
                path:	/logout
                target:	/
            remember_me:
                key: CHANGE_IT!!! # Random key
                lifetime: 31536000 # 1 year in seconds
                path:	/
                domain:	~
                always_remember_me: true
    providers:
        main:
            entity:
                class: Name\UserBundle\Entity\User
                property: email
    encoders:
        Name\UserBundle\Entity\User:
            algorithm: sha1
            iterations: 1
            encode_as_base64: false
    role_hierarchy:
        ROLE_MODERATOR:	ROLE_USER
        ROLE_ADMIN:	[ROLE_MODERATOR, ROLE_ALLOWED_TO_SWITCH]
```

- Extend User

```
use ANS\UserBundle\Entity\User as BaseUser;

/**
 * @ORM\Table(name="user")
 * @ORM\Entity()
 */
class User extends BaseUser
```

- Extend Token

```
use ANS\UserBundle\Entity\Token as BaseToken;

/**
 * @ORM\Table(name="token")
 * @ORM\Entity()
 */
class Token extends BaseToken
```

- Routing

```
# app/config/routing.yml

ans_user:
    resource: "@ANSUserBundle/Resources/config/user/routing.yml"
    prefix:   /
```

- Config

```
# app/config/config.yml

doctrine:
    ...
    orm:
        ...
        resolve_target_entities:
            ANS\UserBundle\Entity\User: Name\UserBundle\Entity\User

ans_user:
    site_name: Name.ru
    site_email: info@name.ru
    user_class: Name\UserBundle\Entity\User
    token_class: Name\UserBundle\Entity\Token
    token_ttl: 3 day
```

- Kernel

```
# app/AppKernel.php

new ANS\UserBundle\ANSUserBundle(),
```

- If UserController exists than it has to extend ANS\\UserBundle\\Controller\\UserController
- If templates and routes have to be replaced

```
# Name\UserBundle\NameUserBundle.php

public function getParent()
{
    return 'ANSUserBundle';
}
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e2c8a1d645c7b218b9cc8e4301e23e1c4f032faeb85dfdb37a4b9145d3fff6fd?d=identicon)[ansnap](/maintainers/ansnap)

---

Top Contributors

[![ansnap](https://avatars.githubusercontent.com/u/5176309?v=4)](https://github.com/ansnap "ansnap (7 commits)")

### Embed Badge

![Health badge](/badges/ansnap-ans-user-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ansnap-ans-user-bundle/health.svg)](https://phpackages.com/packages/ansnap-ans-user-bundle)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
