|
| 1 | +security: |
| 2 | + enable_authenticator_manager: true |
| 3 | + providers: |
| 4 | + sylius_admin_user_provider: |
| 5 | + id: sylius.admin_user_provider.email_or_name_based |
| 6 | + sylius_api_admin_user_provider: |
| 7 | + id: sylius.admin_user_provider.email_or_name_based |
| 8 | + sylius_shop_user_provider: |
| 9 | + id: sylius.shop_user_provider.email_or_name_based |
| 10 | + sylius_api_shop_user_provider: |
| 11 | + id: sylius.shop_user_provider.email_or_name_based |
| 12 | + |
| 13 | + password_hashers: |
| 14 | + Sylius\Component\User\Model\UserInterface: argon2i |
| 15 | + firewalls: |
| 16 | + admin: |
| 17 | + switch_user: true |
| 18 | + context: admin |
| 19 | + pattern: "%sylius.security.admin_regex%" |
| 20 | + provider: sylius_admin_user_provider |
| 21 | + form_login: |
| 22 | + provider: sylius_admin_user_provider |
| 23 | + login_path: sylius_admin_login |
| 24 | + check_path: sylius_admin_login_check |
| 25 | + failure_path: sylius_admin_login |
| 26 | + default_target_path: sylius_admin_dashboard |
| 27 | + use_forward: false |
| 28 | + use_referer: true |
| 29 | + enable_csrf: true |
| 30 | + csrf_parameter: _csrf_admin_security_token |
| 31 | + csrf_token_id: admin_authenticate |
| 32 | + remember_me: |
| 33 | + secret: "%env(APP_SECRET)%" |
| 34 | + path: "/%sylius_admin.path_name%" |
| 35 | + name: APP_ADMIN_REMEMBER_ME |
| 36 | + lifetime: 31536000 |
| 37 | + remember_me_parameter: _remember_me |
| 38 | + logout: |
| 39 | + path: sylius_admin_logout |
| 40 | + target: sylius_admin_login |
| 41 | + |
| 42 | + new_api_admin_user: |
| 43 | + pattern: "%sylius.security.new_api_admin_regex%/.*" |
| 44 | + provider: sylius_api_admin_user_provider |
| 45 | + stateless: true |
| 46 | + entry_point: jwt |
| 47 | + json_login: |
| 48 | + check_path: "%sylius.security.new_api_admin_route%/authentication-token" |
| 49 | + username_path: email |
| 50 | + password_path: password |
| 51 | + success_handler: lexik_jwt_authentication.handler.authentication_success |
| 52 | + failure_handler: lexik_jwt_authentication.handler.authentication_failure |
| 53 | + jwt: true |
| 54 | + |
| 55 | + new_api_shop_user: |
| 56 | + pattern: "%sylius.security.new_api_shop_regex%/.*" |
| 57 | + provider: sylius_api_shop_user_provider |
| 58 | + stateless: true |
| 59 | + entry_point: jwt |
| 60 | + json_login: |
| 61 | + check_path: "%sylius.security.new_api_shop_route%/authentication-token" |
| 62 | + username_path: email |
| 63 | + password_path: password |
| 64 | + success_handler: lexik_jwt_authentication.handler.authentication_success |
| 65 | + failure_handler: lexik_jwt_authentication.handler.authentication_failure |
| 66 | + jwt: true |
| 67 | + |
| 68 | + shop: |
| 69 | + switch_user: { role: ROLE_ALLOWED_TO_SWITCH } |
| 70 | + context: shop |
| 71 | + pattern: "%sylius.security.shop_regex%" |
| 72 | + provider: sylius_shop_user_provider |
| 73 | + form_login: |
| 74 | + success_handler: sylius.authentication.success_handler |
| 75 | + failure_handler: sylius.authentication.failure_handler |
| 76 | + provider: sylius_shop_user_provider |
| 77 | + login_path: sylius_shop_login |
| 78 | + check_path: sylius_shop_login_check |
| 79 | + failure_path: sylius_shop_login |
| 80 | + default_target_path: sylius_shop_homepage |
| 81 | + use_forward: false |
| 82 | + use_referer: true |
| 83 | + enable_csrf: true |
| 84 | + csrf_parameter: _csrf_shop_security_token |
| 85 | + csrf_token_id: shop_authenticate |
| 86 | + remember_me: |
| 87 | + secret: "%env(APP_SECRET)%" |
| 88 | + name: APP_SHOP_REMEMBER_ME |
| 89 | + lifetime: 31536000 |
| 90 | + remember_me_parameter: _remember_me |
| 91 | + logout: |
| 92 | + path: sylius_shop_logout |
| 93 | + target: sylius_shop_homepage |
| 94 | + invalidate_session: false |
| 95 | + |
| 96 | + dev: |
| 97 | + pattern: ^/(_(profiler|wdt)|css|images|js)/ |
| 98 | + security: false |
| 99 | + |
| 100 | + image_resolver: |
| 101 | + pattern: ^/media/cache/resolve |
| 102 | + security: false |
| 103 | + |
| 104 | + access_control: |
| 105 | + - { path: "%sylius.security.admin_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] } |
| 106 | + - { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS } |
| 107 | + - { path: "%sylius.security.shop_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] } |
| 108 | + - { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS } |
| 109 | + |
| 110 | + - { path: "%sylius.security.admin_regex%/login", role: PUBLIC_ACCESS } |
| 111 | + - { path: "%sylius.security.shop_regex%/login", role: PUBLIC_ACCESS } |
| 112 | + |
| 113 | + - { path: "%sylius.security.shop_regex%/register", role: PUBLIC_ACCESS } |
| 114 | + - { path: "%sylius.security.shop_regex%/verify", role: PUBLIC_ACCESS } |
| 115 | + |
| 116 | + - { path: "%sylius.security.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS } |
| 117 | + - { path: "%sylius.security.shop_regex%/account", role: ROLE_USER } |
| 118 | + |
| 119 | + - { path: "%sylius.security.new_api_admin_route%/reset-password-requests", role: PUBLIC_ACCESS } |
| 120 | + - { path: "%sylius.security.new_api_admin_regex%/.*", role: ROLE_API_ACCESS } |
| 121 | + - { path: "%sylius.security.new_api_admin_route%/authentication-token", role: PUBLIC_ACCESS } |
| 122 | + - { path: "%sylius.security.new_api_user_account_regex%/.*", role: ROLE_USER } |
| 123 | + - { path: "%sylius.security.new_api_shop_route%/authentication-token", role: PUBLIC_ACCESS } |
| 124 | + - { path: "%sylius.security.new_api_shop_regex%/.*", role: PUBLIC_ACCESS } |
0 commit comments