doughnut-wedding/app/config/security.yml

59 lines
2.3 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-04-25 15:45:32 -07:00
role_hierarchy:
ROLE_USER: ~
ROLE_ADMIN: [ROLE_USER]
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN]
2017-03-29 09:24:59 -07:00
providers:
2017-04-09 18:08:01 -07:00
fos_userbundle:
2017-04-25 15:45:32 -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:
2017-04-26 21:32:43 -07:00
access_denied_handler: doughnutwedding.security.access_denied_handler
2017-04-09 18:08:01 -07:00
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
instagram: /login/callback/instagram
amazon: /login/callback/amazon
yahoo: /login/callback/yahoo
2017-04-25 15:45:32 -07:00
login_path: /login
2017-04-09 18:08:01 -07:00
use_forward: false
2017-04-25 15:45:32 -07:00
failure_path: /connect
2017-04-09 18:08:01 -07:00
oauth_user_provider:
service: hwi_oauth.user.provider.fosub_bridge
access_control:
2017-04-22 12:43:30 -07:00
2017-04-16 16:55:58 -07:00
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
2017-04-26 21:32:43 -07:00
- { path: ^/login/callback, role: IS_AUTHENTICATED_ANONYMOUSLY }
2017-04-25 15:45:32 -07:00
- { path: ^/logout$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/login_check$, role: IS_AUTHENTICATED_ANONYMOUSLY }
2017-04-16 16:55:58 -07:00
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
2017-04-25 15:45:32 -07:00
- { path: ^/user, role: ROLE_USER }
2017-04-16 16:55:58 -07:00
- { path: ^/gallery/upload, role: ROLE_USER }
- { path: ^/gallery, role: IS_AUTHENTICATED_ANONYMOUSLY }
2017-04-26 21:32:43 -07:00
- { path: ^/admin, role: ROLE_ADMIN }
2017-04-25 15:45:32 -07:00
- { path: ^/.*, role: IS_AUTHENTICATED_ANONYMOUSLY }