hslavich / OneloginSamlBundle

OneLogin SAML Bundle for Symfony
MIT License
149 stars 94 forks source link

Configure the firewalls for saml to use onAuthinticationSucess #201

Open SaraMohamedSamir opened 1 year ago

SaraMohamedSamir commented 1 year ago

Hello,

I am trying for long time now to configure our app to update the DB for user roles after SAML authentication is successful. For now our integration is working but it only creates a new user in our DB but, when the user is updated our internal DB is never updated. I have trying to configure the firewalls in security.yml as following but I couldn't success:

 frontend:
        access_denied_handler: mm.frontend_access_denied_handler
        pattern: ^/
        context: MM
        saml:
            check_path: /saml/acs
            login_path: /saml/login
            failure_path: /user/login
            user_factory: mm.user_factory
            success_handler: mm.custom_authentication_success_handler
            persist_user: true

I am not sure if the OneLoginBundle works with (success_handler) specifically or not. Thanks in advance for the help.