security:
  encoders:
    App\Entity\User:
      algorithm: auto

  providers:
    app_user_provider:
      entity:
        class: App\Entity\User

  firewalls:
    dev:
      pattern: ^/(_(profiler|wdt)|css|images|js)/
      user_checker: App\Security\UserChecker
      security: false
    main:
      anonymous: true
      user_checker: App\Security\UserChecker
      guard:
        authenticators:
          - App\Security\LoginFormAuthenticator
      json_login:
        check_path: app_login
      logout:
        path: app_logout

  # Note: Only the *first* access control that matches will be used
  access_control:
    - { path: ^/session-status$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/api, roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/api/graphql, roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/api/graphql/graphiql*, roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/, roles: IS_AUTHENTICATED_FULLY }
