Your IP : 216.73.217.79


Current Path : /var/www/v3.cesa.co.za/config/packages/
Upload File :
Current File : /var/www/v3.cesa.co.za/config/packages/security.yaml

security:
    # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
    password_hashers:
        App\UserBundle\Entity\UserOld:
            id: App\UserBundle\Security\Hasher\Echasl23Md5PasswordHasher
        App\UserBundle\Entity\UserLogin:
            id: App\UserBundle\Security\Hasher\MemberPortalLegacyPasswordHasher
        Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
    # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
    providers:
#        users_in_memory: { memory: null }
        users:
            entity:
                class: App\UserBundle\Entity\UserList
                property: 'username'
        member_portal_users:
            id: App\UserBundle\Security\MemberPortalUserProvider
        echasl23_users:
            id: App\UserBundle\Security\Echasl23UserProvider
        app_user_provider:
            chain:
                providers: ['users', 'member_portal_users', 'echasl23_users']
#        user_provider:
#            id: iga_user_provider
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        api:
            pattern: ^/api
            stateless: true
            provider: app_user_provider
            custom_authenticators:
                - App\UserBundle\Security\OAuth2Authenticator
        # admin:
        #     pattern: ^/admin
        #     lazy: true
        #     provider: users
        #     logout:
        #         path: logout
            # Allow access to admin area for authenticated users with ROLE_ADMIN
        main:
            pattern: ^/(?!api) # |admin)
            lazy: true
            provider: app_user_provider
            form_login:
                check_path: /login
                login_path: /login
                success_handler: iga_user.authentication.handler.login_success_handler
                failure_handler: iga_user.authentication.handler.login_failure_handler
            logout:
                path: logout

            # activate different ways to authenticate
            # https://symfony.com/doc/current/security.html#the-firewall

            # https://symfony.com/doc/current/security/impersonating_user.html
            # switch_user: true

    # Easy way to control access for large sections of your site
    # Note: Only the *first* access control that matches will be used
    access_control:
        # - { path: ^/api, roles: IS_AUTHENTICATED_FULLY }  # Temporarily disable
        - { path: ^/admin, roles: ROLE_ADMIN }
        - { path: ^/member-firm, roles: [ROLE_MEMBER_FIRM, ROLE_USER] }
        # - { path: ^/profile, roles: ROLE_USER }

when@test:
    security:
        password_hashers:
            # By default, password hashers are resource intensive and take time. This is
            # important to generate secure password hashes. In tests however, secure hashes
            # are not important, waste resources and increase test times. The following
            # reduces the work factor to the lowest possible values.
            Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
                algorithm: auto
                cost: 4 # Lowest possible value for bcrypt
                time_cost: 3 # Lowest possible value for argon
                memory_cost: 10 # Lowest possible value for argon