Skip to content

Instantly share code, notes, and snippets.

@acrosa
Created December 13, 2010 12:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acrosa/738940 to your computer and use it in GitHub Desktop.
Save acrosa/738940 to your computer and use it in GitHub Desktop.
OAuth gem workaround on JRuby
module OAuth::Signature::HMAC
class Base < OAuth::Signature::Base
private
def digest
self.class.digest_class Object.module_eval("::Digest::#{self.class.digest_klass}")
digest = OpenSSL::Digest::Digest.new('sha1')
OpenSSL::HMAC.digest(digest, secret, signature_base_string)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment