Coder Social home page Coder Social logo

autodiscover's People

Contributors

homerlex avatar zenchild avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autodiscover's Issues

OpenSSL::SSL::SSLError

I realize this is a very new gem. Thanks for your work!

I've been spiking recently on integrating Viewpoint into my app and I recently decided I'd like to integrate use of Exchange's Autodiscovery so my user's wouldn't need to know their EWS endpoints.

That being said, I experienced the following while playing with this gem:

client = Autodiscover::Client.new(email: user.email, password: user.password)
#=> #<Autodiscover::Client:0x007ff4c8413768 ...<details snipped>...>

data = client.autodiscover
#=> OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
#   from /Code/ews_poc/vendor/bundle/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:307:in `connect'

I haven't had to deal with server certificates at all while playing with your `WinRb/Viewpoint' gem, so I thought this might be a "new gem; version 0.1.0; all-of-the-things don't work yet!" kinda thing.

On a whim, I did the following:

pox_request = Autodiscover::PoxRequest.new(client)
# => #<Autodiscover::PoxRequest:0x007ff4c4af9b80 ...<details snipped>...>

pox_request.send(:request_body)
#=> "<?xml version=\"1.0\"?>\n<Autodiscover xmlns=\"http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006\">\n  <Request>\n    <EMailAddress>[email protected]</EMailAddress>\n    <AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>\n  </Request>\n</Autodiscover>\n"

pox_request.send(:available_urls).to_a
#=> ["https://advisory.com/autodiscover/autodiscover.xml", "https://autodiscover.advisory.com/autodiscover/autodiscover.xml", nil]

pox_request.instance_variable_get(:@formatted_urls)
#=> ["https://users_domain.com/autodiscover/autodiscover.xml", "https://autodiscover.users_domain.com/autodiscover/autodiscover.xml"]

pox_request.instance_variable_get(:@formatted_urls).each { |url| url.gsub!(/https/, 'http') }
=> ["http://users_domain.com/autodiscover/autodiscover.xml", "http://autodiscover.users_domain.com/autodiscover/autodiscover.xml"]

response = pox_request.autodiscover
#=> #<Autodiscover::PoxResponse:0x007ff4caaca488 ...<details snipped>...>

response.ews_url
#=> "https://mail.users_domain.com/ews/exchange.asmx"

Should I expect that I need to deal with server certificates? Is the gem supposed to handle this sort of thing but it just isn't handled yet?

I'm getting back nil for autodiscover

With this script:

require 'autodiscover'
client = Autodiscover::Client.new(email: "[email protected]", password: "XXXXXXXX")
data = client.autodiscover(ignore_ssl_errors: true)
puts data.response

I'm getting back nil for the autodiscover call. I have to do the ignore, as the certificate doesn't match the domain (the exchange admins say that there's no problem, but eM Client complains about this too).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.