security:
    encoders:
        Nkt\UserBundle\Entity\User: plaintext

    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]

    providers:
        main:
            entity:
                class: Nkt\UserBundle\Entity\User
                property: twitterId

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false
        secured_area:
            pattern: ^/
            anonymous: ~
            oauth:
                resource_owners:
                    twitter: "/login/check-twitter"
                login_path:   /login
                use_forward:  false
                failure_path: /login

                oauth_user_provider:
                    service: oauth.user.provider

    access_control:
        - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/, roles: ROLE_USER }

security:
    encoders:
        Nkt\UserBundle\Entity\User: plaintext

    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]

    providers:
        main:
            entity:
                class: Nkt\UserBundle\Entity\User
                property: twitterId

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false
        secured_area:
            pattern: ^/
            anonymous: ~
            oauth:
                resource_owners:
                    twitter: "/login/check-twitter"
                login_path:   /login
                use_forward:  false
                failure_path: /login

                oauth_user_provider:
                    service: oauth.user.provider

    access_control:
        - { path: ^/(login|connect), roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/, roles: ROLE_USER }

Allow anonymous go to ^/connect
Allow anonymous go to ^/connect
