Currently the module support defining custom login addresses and also provides an event that allows to customize further the redirection (by adding extra query parameters and so on).
Ideally it should be possible to do the same during the validation step of the process.
The proposed solution is to add a new parameter in the configuration that will store a custom validation path. This validation path will be used instead of the predefined ones ONLY if it is set, if it is empty it will fall back to the default ones.
In addition, a PreValidateEvent will be triggered. This trigger would allow the customize the $validate_url and $param parameters.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 3001882-13.patch | 7.84 KB | bkosborne |
| #12 | interdiff.txt | 1.24 KB | bkosborne |
| #11 | 3001882-11.patch | 7.61 KB | upchuk |
| #10 | 3001882-10.patch | 7.6 KB | ieguskiza |
| #8 | 3001882-8.patch | 4.13 KB | ieguskiza |
Comments
Comment #2
bkosborneWhy do you need a custom validation path? If your CAS server implements the CAS protocol appropriately, then the paths are all the same. What CAS server software are you using?
Comment #3
ieguskiza commentedHi there, the CAS server we use follows the protocol but also provides alternate options that allow more fine-grained authentication.
I agree it may sound too specific but at the very least I think there should be a PreValidateEvent, if only for consistency's sake since there already is a PreRedirectEvent as well.
Comment #4
ieguskiza commentedI uploaded a patch to showcase the proposed solution.
Comment #6
ieguskiza commentedApologies, the previous patch was not the correct one.
Comment #7
bkosborneI think the new pre validate event should handle all the customizations. We shouldn't add the ability to specify a unique validation URL in the admin config. I think the admin config should satisfy the needs of 90% of the CAS setups, and I don't think yours is a common one. The pre validate event can have a method to control the base URL and path.
Comment #8
ieguskiza commentedYeah that makes sense. I uploaded a patch where the event allows to modify both the path and the parameters. Let me know what you think.
Comment #10
ieguskiza commentedFixed the test and added a separate one for the new event.
Comment #11
upchuk commentedMade some small corrections. Nothing major.
Comment #12
bkosborneLooks good. I just modified the comments.
Comment #13
bkosborneOops empty patch
Comment #16
bkosborne