security:
    firewalls:
        admin:
            pattern:    ^/admin
#            logout_on_user_change: true
            anonymous:  ~
            provider:    user
            form_login:
                always_use_default_target_path: true
                default_target_path: admin_blog_list
                login_path:    admin_login
                check_path:    admin_login_check
            logout:
                path: admin_logout
                target: admin_login
            remember_me:
                secret:   '%kernel.secret%'
                lifetime: 31536000 # 31536000 365 days in seconds
                always_remember_me: true

    access_control:
        - { path: ^/admin/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/*, roles: ROLE_ADMIN }

    providers:
        user:
            entity: { class: App\Entity\User, property: user }

    encoders:
        App\Entity\User: { algorithm: sha512, iterations: 10 }




#security:
#    # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
#    providers:
#        users_in_memory: { memory: null }
#    firewalls:
#        dev:
#            pattern: ^/(_(profiler|wdt)|css|images|js)/
#            security: false
#        main:
#            anonymous: lazy
#            provider: users_in_memory
#
#            # activate different ways to authenticate
#            # https://symfony.com/doc/current/security.html#firewalls-authentication
#
#            # 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: ^/admin, roles: ROLE_ADMIN }
#        # - { path: ^/profile, roles: ROLE_USER }
