# End point uses an X509 certificate for authentication. See ssl_options= for all options.
# class Person < ActiveResource::Base
# self.site = "https://secure.api.people.com/ "
# self.ssl_options = {:cert => OpenSSL::X509::Certificate.new(File.open(pem_file))
# :key => OpenSSL::PKey::RSA.new(File.open(pem_file)),
# :ca_path => "/path/to/OpenSSL/formatted/CA_Certs",
# :verify_mode => OpenSSL::SSL::VERIFY_PEER}
# end
Though this is may not be used by a large number of people it provides a great deal of flexibility for using Active Resource over ssl.
No comments:
Post a Comment