Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Symfony2 Essentials

You're reading from   Symfony2 Essentials

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher
ISBN-13 9781784398767
Length 158 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Security handling


Symfony2 handles all the security-related actions through its own security system. This system is very flexible and powerful, but requires some setup. We need to start our journey through this system by reviewing its initial configuration file located in the app/config/security.yml file. Here, we still see some references after the demo app, which we will sort out in this chapter.

Let's review this:

# To get started with security, check out the documentation:
# http://symfony.com/doc/current/book/security.html
security:

    providers:
        in_memory:
            memory: ~

    firewalls:
        # disables authentication for assets and the 
        # profiler, adapt it according to your needs
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false

        main:
            anonymous: ~
            # activate different ways to authenticate

            # http_basic: ~

            # form_login: ~

The preceding file contains only...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image