1

I'm trying to authenticate users from in_memory provider for one section on the site and sso provider for all the other pages, so I tried the following:

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

providers:
    sso:
        id: sso.security.user.provider
    fos_twitter:
        id: fos_twitter.auth
    in_memory:
        users:
            ryan:  { password: ryanpass, roles: 'ROLE_CANVAS_ADMIN' }
            admin: { password: kitten, roles: 'ROLE_CANVAS_ADMIN' }

firewalls:
    main:
        pattern: ^/canvas
        provider: in_memory
    secured_area:
        pattern: ^/
        form_login:
            login_path:  /signin
            check_path:  /login_check
        anonymous: true
        sso: true
        fos_twitter: false
access_control:
- { path: ^/canvas, roles: [ROLE_CANVAS_ADMIN] }

This is not working, because it always enter to the /signin login path and this working using the sso provider. I already tried the following implementations: Authenticate multiple symfony2 firewalls with one login form, http://symfony.com/doc/2.0/cookbook/security/custom_authentication_provider.html and this: http://symfony.com/doc/current/book/security.html#using-multiple-user-providers None of them work for me.

Can someone help with that?

Thanks..

Community
  • 1
  • 1
Meir
  • 91
  • 2
  • 6

0 Answers0