To get started with security, check out the documentation:
https://symfony.com/doc/current/security.html
security: encoders: AppBundle\Entity\Usuario: algorithm: bcrypt # https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded providers: db_provider: entity: class: AppBundle:Usuario
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: ~
form_login:
login_path: login
check_path: login
default_target_path: admin
logout:
path: logout
target: index
remember_me:
secret: '%secret%'
lifetime: 604800 # 1 week in seconds
path: /
access_control:
- { path: ^/login, roles: IS_AUTHENTICATED_ANONIMOUSLY }
- { path: ^/admin, roles: IS_AUTHENTICATED_FULLY }