-
Notifications
You must be signed in to change notification settings - Fork 77
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
Setting verify_ssl_cert was not taking effect / Proxy Support #44
base: master
Are you sure you want to change the base?
Conversation
Also in this pull request is proxy support. SetupTo set up proxy support, generate and run the migration:
Next, set up your callback. Assuming your callback URL is config.rack_cas.pgt_callback_url = 'https://app.dev/pgtCallback' ...and add to your get '/pgtCallback', to: Rails.application.config.rack_cas NOTE: You may define your own callback path instead of UseIf everything is set up correctly, your session should have the Proxy Granting Ticket when you are logged in: session['cas']['pgt'] #=> "PGT-1234567890" To generate a proxy ticket for your other app ( require 'rack-cas/proxy_ticket_generator'
pgt = session['cas']['pgt'] #=> "PGT-1234567890"
my_other_service_url = 'https://my-other-app.dev/'
proxy_ticket = RackCAS::ProxyTicketGenerator.generate(my_other_service_url, pgt) #=> "PT-12121212"
# This is the URL you will use to access your other service:
my_other_service_url += "?ticket=#{proxy_ticket}" #=> "https://my-other-app.dev/?ticket=PT-12121212" |
Thanks for all of the work on this. Sorry it's taken me so long to get back to you about it. I've been busy with other projects for a while. I haven't ever had the need to use proxy tickets with any of my applications so this is not a part of CAS that I'm not very familiar with. But I'll try to set up a test environment so I can properly review this soon. I may want you to split this pull request up into three separate PRs, one for each commit, but I'll let you know. |
You're very welcome. It wasn't too terribly difficult to implement since the existing code is very well structured and easy to follow. Also, I've added one more commit which corrects one of the tests. |
I'm very interested in this feature |
I apologize that it's been so long for me to get to this. I'm really busy through the end of the month. But I'm going to do my best to test this out and review the code in early May. |
Sorry again it's been so long that I've left this feature unmerged. I've gone ahead and added the fixes for I'd like to get a couple apps setup to actually test the proxy ticket functionality. I'll let you know when I have that done or if somebody else would like to push a couple example apps up to github that would be awesome. I don't have a lot of free time now but I'll fit this in where I can. |
…roxyResponse::Nokogiri" error.
# Conflicts: # lib/rack-cas/configuration.rb # lib/rack-cas/server.rb # spec/rack-cas/configuration_spec.rb
I found that setting the configuration option,
verify_ssl_cert
, tofalse
was not having any effect. This was due to the method,verify_ssl_cert?
, returningtrue
sinceverify_ssl_cert
was neithernil
nor an empty array. I added a condition to check if the setting isfalse
and that seems to work.