open-orchestra/open-orchestra

View on GitHub
app/config/security.yml

Summary

Maintainability
Test Coverage
security:
    encoders:
        FOS\UserBundle\Model\UserInterface: sha512

    providers:
        fos_userbundle:
            id: fos_user.user_provider.username

    access_decision_manager:
        strategy: unanimous

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false
        api:
            pattern: ^/api/
            oauth2: ~
            anonymous: false
            security: true
            context: openorchestra
        main:
            pattern: ^/
            form_login:
                provider: fos_userbundle
                csrf_provider: security.csrf.token_manager
            anonymous: true
            context: openorchestra
            user_checker: open_orchestra_user_admin.user_checker
            logout:
                path:   /logout
                target: /admin

    access_control:
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/, role: ROLE_USER }
        - { path: ^/api/, role: ROLE_USER }