2017 © Pedro Peláez
 

symfony-bundle security-bundle

The security bundle for Minimal

image

minimaloriginal/security-bundle

The security bundle for Minimal

  • Wednesday, October 11, 2017
  • by MinimalOriginal
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

MinimalOriginal SecurityBundle

The security bundle for Minimal, (*1)

Command to launch

bin/console fos:user:create testuser test@example.com p@ssword --super-admin, (*2)

Register bundle

$bundles = [ ... new FOS\UserBundle\FOSUserBundle(), new MinimalOriginal\SecurityBundle\MinimalSecurityBundle(), ];, (*3)

Register routes

minimal_security: resource: "@MinimalSecurityBundle/Resources/config/routing.yml" prefix: /, (*4)

Security configuration

security: encoders: MinimalOriginal\SecurityBundle\Entity\User: bcrypt, (*5)

role_hierarchy:
    ROLE_ADMIN:       ROLE_USER
    ROLE_SUPER_ADMIN: ROLE_ADMIN

providers:
    minimal_security:
        id: fos_user.user_provider.username_email

firewalls:
    main:
        pattern: ^/
        form_login:
            provider: minimal_security
            csrf_token_generator: security.csrf.token_manager
            # if you are using Symfony < 2.8, use the following config instead:
            # csrf_provider: form.csrf_provider

        logout:       true
        anonymous:    true

access_control:
    - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/admin/, role: ROLE_USER }

The Versions

11/10 2017

dev-master

9999999-dev

The security bundle for Minimal

  Sources   Download

MIT

The Requires

 

security bundle