Giter VIP home page Giter VIP logo

duo_api_ruby's Issues

403 Forbidden trying out the examples

unfortunately, this isn't working for me:

irb(main):020:0> duo_api = DuoApi.new DuoApi::YML[:ikey], DuoApi::YML[:skey], DuoApi::YML[:host]
=> #<DuoApi:0x007fdf74ff3290 @ikey="redacted", @skey="redacted", @host="api-redacted.duosecurity.com">
irb(main):021:0> resp = duo_api.request 'GET', '/admin/v1/users'
=> #<Net::HTTPForbidden 403 Forbidden readbody=true>

any suggestions?

Implement canonicalization v5 for API calls

Description

We need the v5 canonicalization algorithm implemented in ruby, so the client can call api endpoints which require it (primarily the policy-related ones)

Expected Behavior

APIs requiring v5 canonicalization can be called

Actual Behavior

They can't

See the Python client for a reference implementation of the v5 algorithm

Ruby 2.2.3 requires a switch from Digest::HMAC to OpenSSL::HMAC

Very similar to this issue in another project: emartech/escher-ruby#5

Basically, Ruby 2.2.3 doesn't have the Digest::HMAC class.

From http://ruby-doc.org//stdlib-1.9.3/libdoc/digest/rdoc/Digest/HMAC.html:

CAUTION: Use of this library is discouraged, because this implementation was meant to be experimental but somehow got into the 1.9 series without being noticed. Please use OpenSSL::HMAC in the “openssl” library instead.

So we need to switch to using the OpenSSL HMAC class instead.

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.