PHPackages                             dcs/security-core-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. dcs/security-core-bundle

ActiveSymfony-bundle

dcs/security-core-bundle
========================

The DCSSecurityCoreBundle provides the basic services for the management of security

0402PHP

Since Dec 31Pushed 9y ago1 watchersCompare

[ Source](https://github.com/damianociarla/DCSSecurityCoreBundle)[ Packagist](https://packagist.org/packages/dcs/security-core-bundle)[ RSS](/packages/dcs-security-core-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/13a9be9226a4aadb4b038ea94d551ace3326fd9cda1508a81dda6f96cddb1875/68747470733a2f2f7472617669732d63692e6f72672f64616d69616e6f636961726c612f4443535365637572697479436f726542756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/damianociarla/DCSSecurityCoreBundle) [![Coverage Status](https://camo.githubusercontent.com/c0bb46c8f31b323b76ffaf80b9c58f7ac602460b2222dd41f84257430205437a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f64616d69616e6f636961726c612f4443535365637572697479436f726542756e646c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/damianociarla/DCSSecurityCoreBundle?branch=master)

DCSSecurityCoreBundle
=====================

[](#dcssecuritycorebundle)

The DCSSecurityCoreBundle offers the integration of **DCSUser** with the *Symfony security system*.

This bundle provides a custom **UserProvider** and a custom **AuthenticationProvider**.

### The UserProvider

[](#the-userprovider)

The **UserProvider** using the `DCS\User\CoreBundle\Repository\UserRepositoryInterface` deals with recovering the user. During the **loadUserByUsername** action will be emitted two events *(before and after the user search)* that allow you to insert additional logic.

### The AuthenticationProvider

[](#the-authenticationprovider)

This provider extends the `Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider` and adds an event after executing the **authenticate** method. The AuthenticationProvider is not used directly by this bundle, but is provided as a service in the implementation of a final SecurityFactoryInterface.

See: [DCSSecurityAuthFormBundle](https://github.com/damianociarla/DCSSecurityAuthFormBundle) authentication system that uses the login form.

### Events

[](#events)

The complete list of events is within the class `DCS\Security\CoreBundle\DCSSecurityCoreEvents`.

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

[](#installation)

### Prerequisites

[](#prerequisites)

This bundle requires [DCSUserCoreBundle](https://github.com/damianociarla/DCSUserCoreBundle).

### Require the bundle

[](#require-the-bundle)

Run the following command:

```
$ composer require dcs/security-core-bundle "~1.0@dev"

```

Composer will install the bundle to your project's `vendor/dcs/security-core-bundle` directory.

### Enable the bundle

[](#enable-the-bundle)

Enable the bundle in the kernel:

```
