security:
  providers:
    m365_virtual_provider:
      id: Cop\Security\M365UserProvider

  firewalls:
    dev:
      pattern: ^/(_(profiler|wdt)|css|images|js)/
      security: false

    main:
      lazy: true
      provider: m365_virtual_provider
      access_denied_handler: Cop\Security\AccessDeniedHandler
      entry_point: Cop\Security\LoginEntryPoint


      custom_authenticator:
        - Cop\Security\MicrosoftSessionAuthenticator

      logout:
        path: app_logout
        target: app_login

  access_control:
    - { path: ^/connect/microsoft, roles: PUBLIC_ACCESS }
    - { path: ^/login, roles: PUBLIC_ACCESS }
#    - { path: ^/, roles: ROLE_USER }
#    - { path: ^/search, roles: ROLE_API }
    - { path: ^/, roles: PUBLIC_ACCESS }
    - { path: ^/search, roles: PUBLIC_ACCESS }