I'm currently working on a custom module which holds a list of organization IDs that will be used to match with an attribute I get from a SAML idP response.
I'm currently using the saml_sp SAML Service Provider module which has hooks/functions for finding the Drupal user and log it in, otherwise create a new user if none exists with that email.
I need to check if the org. ID matches any of the IDs in my custom module's table entries instead, so there's a substantial amount of modifications needed to change this workflow.
Preferably, I wish not to do any modifications to the saml_sp code as future updates of that module or fresh installations would cause havoc and the login won't work.
Is there a way to bypass saml_sp's hooks/functions so that my custom module can "take over" once the particular hook/function in saml_sp gets called?
There seems to be a lot of mixed opinions about this. Personally I don't see the point in not being able to do this, as the typical Drupal installation consist of an orgy of modules and they should all be able manipulate each other, right? Or am I missing another simpler solution to the problem?