doughnut-wedding/app/config/security.yml

60 lines
2.4 KiB
YAML
Raw Normal View History

2017-03-29 09:24:59 -07:00
# To get started with security, check out the documentation:
# http://symfony.com/doc/current/security.html
security:
2017-04-09 18:08:01 -07:00
encoders:
FOS\UserBundle\Model\UserInterface:
algorithm: bcrypt
cost: 14
2017-03-29 09:24:59 -07:00
# http://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
providers:
2017-04-09 18:08:01 -07:00
#in_memory:
# memory: ~
fos_userbundle:
id: fos_user.user_provider.username
#id: fos_user.user_manager
2017-03-29 09:24:59 -07:00
firewalls:
# disables authentication for assets and the profiler, adapt it according to your needs
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
2017-04-09 18:08:01 -07:00
secured_area:
pattern: ^/
form_login:
provider: fos_userbundle
login_path: /user/connect/
check_path: /login/login_check
logout:
path: /user/logout
target: /
anonymous: true
oauth:
resource_owners:
facebook: /user/login/callback/facebook
google: /user/login/callback/google
twitter: /user/login/callback/twitter
windows: /user/login/callback/windows
instagram: /user/login/callback/instagram
amazon: /user/login/callback/amazon
yahoo: /user/login/callback/yahoo
login_path: /user/oauth
use_forward: false
failure_path: /user/oauth
oauth_user_provider:
service: hwi_oauth.user.provider.fosub_bridge
#oauth_user_provider:
# service: my.oauth_aware.user_provider.service
2017-03-29 09:24:59 -07:00
main:
anonymous: ~
# activate different ways to authenticate
# http://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
#http_basic: ~
# http://symfony.com/doc/current/cookbook/security/form_login_setup.html
#form_login: ~
2017-04-09 18:08:01 -07:00
access_control:
- { path: ^/user/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/user/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/user/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/, role: ROLE_ADMIN }