security:
    enable_authenticator_manager: true
    # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
    password_hashers:
        Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
    # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
    providers:
        # app_user_provider:
        #     id: App\Security\UserProvider
        bkp_user_provider:
            entity:
                class: App\Entity\ExamenesUser
                property: username
        all_users:
            chain:
                # providers: ['bkp_user_provider', 'app_user_provider']
                providers: ['bkp_user_provider']
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            pattern: ^/
            lazy: true
            custom_authenticator: App\Security\AppSSOConsejoAuthenticator
            provider: all_users
            logout:
                path: app_logout
        #         # where to redirect after logout
                target: portal_consejo

    # 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: ^/admin/app/convocatorias*, roles: ROLE_INFORMATICA }
        - { path: ^/admin/app/inscripcionesexcepcionales*, roles: ROLE_INFORMATICA }
        - { path: ^/admin, roles: [ROLE_INFORMATICA, ROLE_EVALUACION] }
        - { path: ^/admin/app/personal*, roles: ROLE_INFORMATICA }
        # - { path: ^/convocatorias/cert/inscripcion/, roles: PUBLIC_ACCESS }
        - { path: ^/sso_connect, roles: PUBLIC_ACCESS }
        - { path: ^/portal/aspirante/, roles: PUBLIC_ACCESS }
        - { path: ^/portal/consejo/, roles: PUBLIC_ACCESS }
        - { path: ^/logout, roles: IS_AUTHENTICATED_REMEMBERED }
        - { path: ^/, roles: IS_AUTHENTICATED_REMEMBERED }

