jms_security_extra:
    secure_all_services: true
    expressions:         true

security:
    acl:
        connection: default

    encoders:
        BehatViewer\BehatViewerCoreBundle\Entity\User:
            algorithm:        sha1
            encode_as_base64: false
            iterations:       1

    role_hierarchy:
        ROLE_USER:          ROLE_USER
        ROLE_PREMIUM:       ROLE_USER
        ROLE_ADMIN:         ROLE_PREMIUM

    providers:
        main:
            entity: { class: BehatViewerCoreBundle:User, property: username }


    access_control:
        - { path: ^/api, roles: ROLE_USER }
        - { path: ^/admin, roles: ROLE_ADMIN }
        - { path: ^/worker, roles: ROLE_ADMIN }

    firewalls:
        api:
            pattern:    ^/api
            stateless:  true
            api:        true

        main:
            pattern:   ^/
            anonymous: ~

            form_login:
                login_path:                     /login
                check_path:                     /login/check

            remember_me:
                key:      "%secret%"
                lifetime: 3600
                path:     /
                domain:   ~

            logout:
                path:   /logout
                target: /

jms_security_extra:
    secure_all_services: true
    expressions:         true

security:
    acl:
        connection: default

    encoders:
        BehatViewer\BehatViewerCoreBundle\Entity\User:
            algorithm:        sha1
            encode_as_base64: false
            iterations:       1

    role_hierarchy:
        ROLE_USER:          ROLE_USER
        ROLE_PREMIUM:       ROLE_USER
        ROLE_ADMIN:         ROLE_PREMIUM

    providers:
        main:
            entity: { class: BehatViewerCoreBundle:User, property: id }


    access_control:
        - { path: ^/api, roles: ROLE_USER }
        - { path: ^/admin, roles: ROLE_ADMIN }
        - { path: ^/worker, roles: ROLE_ADMIN }

    firewalls:
        api:
            pattern:    ^/api
            stateless:  true
            api:        true

        main:
            pattern:   ^/
            anonymous: ~

            form_login:
                login_path:                     /login
                check_path:                     /login/check

            remember_me:
                key:      "%secret%"
                lifetime: 3600
                path:     /
                domain:   ~

            logout:
                path:   /logout
                target: /

Fix user property for identity
Fix user property for identity
