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

  role_hierarchy:
    ROLE_ADMIN: ROLE_ADMIN
    ROLE_USER: ROLE_USER
  providers:
    app_user_provider:
      entity:
        class: App\Entity\User
        property: email
    app_access_link_provider:
      entity:
        class: App\Entity\AccessLink
        property: link
  firewalls:
    dev:
      pattern: ^/(_(profiler|wdt)|css|images|js)/
      security: false
    access_link:
      pattern: ^/access
      anonymous: true
      lazy: true
      provider: app_access_link_provider
      guard:
        authenticators:
          - App\Security\AccessLinkAuthenticator
    main:
      anonymous: true
      lazy: true
      provider: app_user_provider
      guard:
        authenticators:
          - App\Security\FormAuthenticator
      logout:
        path: app_logout
  access_control:
      - { path: ^/access/*/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }

