Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a configuration to override the URL validation. #38

Closed
wants to merge 1 commit into from

Conversation

erozqba
Copy link

@erozqba erozqba commented Dec 15, 2016

Fix #37

Changes:

  • Add an optional configuration to set a custom URL validation.

@erozqba erozqba force-pushed the custom_url_validation branch from 9af1b84 to 7c57f50 Compare December 15, 2016 23:43
@XavRsl
Copy link
Owner

XavRsl commented Dec 16, 2016

Hi Ernesto,
Thank you for the time you spent on your pull request.
A few things bother me in your commit. You are using phpCAS::setServerServiceValidateURL but this method is only used in CAS 1.0 validation (https://developer.jasig.org/cas-clients/php/1.1.3/docs/api/group__publicAuth.html#gaddd5fc35d30270c1230c334730da0b17). Your code validates the URL when using SAML but not in proxy mode when there is a method for that https://developer.jasig.org/cas-clients/php/1.1.3/docs/api/group__publicAuth.html#gafeda1ee79b77d0ce1d6d2d0be92851d4.
Finally, could you rewrite your comments for configureServerValidateURL method and for Custom CAS Validation URL config, they don't provide any helpful information.

Thanks,

Xavier

@XavRsl XavRsl closed this Dec 16, 2016
@erozqba
Copy link
Author

erozqba commented Dec 16, 2016

Hi XavRsl,
Thanks for your quick feedback, I will try to make the changes that you propose and open another PR.
I have some question and maybe you can help me to find the answers or a preferable way to find out a solution:

  • Right now, the version of CAS is hard coded in Sso::configureCasClient to CAS_VERSION_2_0 or SAML_VERSION_1_1, so is not possible to use CAS 1.0 and then use phpCAS::setServerServiceValidateURL.
  • In the project I'm working right now the authentication works fine with CAS_VERSION_2_0 but I have to use phpCAS::setServerServiceValidateURL to find out the user attributes, because if I use phpCAS::setServerProxyValidateURL an empty array is returned for the attributes.

I will appreciate any suggestion, to make this work for everyone and the phpCAS::setServerServiceValidateURL can be used even when the CAS version is 2.0 ?

@XavRsl
Copy link
Owner

XavRsl commented Dec 16, 2016 via email

@erozqba
Copy link
Author

erozqba commented Dec 16, 2016

There is a reason why you only use CAS_VERSION_2_0 or SAML_VERSION_1_1 and there are not the possibility to use CAS version 1.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants