2017 © Pedro Peláez
 

symfony-bundle security-core-bundle

The DCSSecurityCoreBundle provides the basic services for the management of security

image

dcs/security-core-bundle

The DCSSecurityCoreBundle provides the basic services for the management of security

  • Saturday, December 31, 2016
  • by damianociarla
  • Repository
  • 1 Watchers
  • 0 Stars
  • 26 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Build Status Coverage Status, (*1)

DCSSecurityCoreBundle

The DCSSecurityCoreBundle offers the integration of DCSUser with the Symfony security system., (*2)

This bundle provides a custom UserProvider and a custom AuthenticationProvider., (*3)

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., (*4)

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., (*5)

See: DCSSecurityAuthFormBundle authentication system that uses the login form., (*6)

Events

The complete list of events is within the class DCS\Security\CoreBundle\DCSSecurityCoreEvents., (*7)

Installation

Prerequisites

This bundle requires DCSUserCoreBundle., (*8)

Require the bundle

Run the following command:, (*9)

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

Composer will install the bundle to your project's vendor/dcs/security-core-bundle directory., (*10)

Enable the bundle

Enable the bundle in the kernel:, (*11)

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new DCS\Security\CoreBundle\DCSSecurityCoreBundle(),
        // ...
    );
}

Configure

Now that you have properly enabled this bundle, the next step is to configure it to work with the specific needs of your application., (*12)

Add the following configuration to your config.yml., (*13)

dcs_security_core:
    provider_key: #SECURITY_PROVIDER_NAME

And sets the provider to your security.yml., (*14)

security:
    providers:
        dcs_user:
            id: dcs_security.core.provider.user

    # !!Now use the provider in your authentication provider within the firewall!!

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker., (*15)

The Versions

31/12 2016

dev-master

9999999-dev

The DCSSecurityCoreBundle provides the basic services for the management of security

  Sources   Download

MIT

The Requires

  • php >=5.3.9

 

The Development Requires

security