doughnut-wedding/app/config/security.yml

47 lines
1.9 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
providers:
2017-04-09 18:08:01 -07:00
fos_userbundle:
2017-04-16 16:55:58 -07:00
id: fos_user.user_provider.username_email
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
2017-04-16 16:55:58 -07:00
login_path: /login
check_path: /login_check
2017-04-09 18:08:01 -07:00
logout:
2017-04-16 16:55:58 -07:00
path: /logout
2017-04-09 18:08:01 -07:00
target: /
anonymous: true
oauth:
resource_owners:
2017-04-16 16:55:58 -07:00
facebook: /login/callback/facebook
google: /login/callback/google
twitter: /login/callback/twitter
windows: /login/callback/windows
instagram: /login/callback/instagram
amazon: /login/callback/amazon
yahoo: /login/callback/yahoo
login_path: /login
2017-04-09 18:08:01 -07:00
use_forward: false
2017-04-16 16:55:58 -07:00
failure_path: /login
2017-04-09 18:08:01 -07:00
oauth_user_provider:
service: hwi_oauth.user.provider.fosub_bridge
access_control:
2017-04-16 16:55:58 -07:00
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/user, role: ROLE_USER }
- { path: ^/gallery/upload, role: ROLE_USER }
- { path: ^/gallery, role: IS_AUTHENTICATED_ANONYMOUSLY }
2017-04-09 18:08:01 -07:00
- { path: ^/admin/, role: ROLE_ADMIN }