nbgrp / onelogin-saml-bundle

OneLogin SAML Symfony Bundle
BSD 3-Clause "New" or "Revised" License
43 stars 13 forks source link

Override reply (assertion customer service) doesn't work. #27

Open haroldiedema opened 1 year ago

haroldiedema commented 1 year ago

routes.php in this bundle use hard-coded paths. The bundle configuration allows us to specify an ACS URL, but this doesn't override the default /saml/acs route. I need this to be /saml2. How should I approach this problem?

Edit:

I've worked around the issue by manually defining routes (based on the ones from the bundle). I don't think this is a good solution though. In case routes get added or removed in the future, this would break future updates on my end.

saml_metadata:
    path: '/saml/metadata'
    controller: Nbgrp\OneloginSamlBundle\Controller\Metadata
    defaults: {'idp': ~}

saml_acs:
    path: '/saml2' # <--- This is the one I changed.
    controller: Nbgrp\OneloginSamlBundle\Controller\AssertionConsumerService
    defaults: {'idp': ~}
    methods: ['POST']

saml_login:
    path: '/saml/login'
    controller: Nbgrp\OneloginSamlBundle\Controller\Login
    defaults: { 'idp': ~ }

saml_logout:
    path: '/saml/logout'
    controller: Nbgrp\OneloginSamlBundle\Controller\Logout
    defaults: { 'idp': ~ }
a-menshchikov commented 1 year ago

@haroldiedema hi! I have no idea how to customize paths in routes configuration at the moment. But I don't think that manual routes definition (from bundle's origin routes) is a bad idea. I may be wrong, but I've been doing the same many times. :smiley: