Skip to content

Instantly share code, notes, and snippets.

@jjanauskas
jjanauskas / draft-ietf-oauth-v2-http-mac-00-webtopay-example.rb
Created August 5, 2012 10:46
This example calculates request MAC according to "HTTP Authentication: MAC Access Authentication (draft 01)" example from webtopay wallet api
# author: Justas Janauskas,
# Aug 5, 2012
#
# This example calculates request MAC according to "HTTP Authentication: MAC Access Authentication (draft 01)"
# example from webtopay wallet api
#
# ref: http://tools.ietf.org/pdf/draft-ietf-oauth-v2-http-mac-00.pdf
# ref: https://www.webtopay.com/wallet/
require 'base64'
@jjanauskas
jjanauskas / draft-ietf-oauth-v2-http-mac-00-example.rb
Created August 5, 2012 10:25
This example calculates request MAC according to "HTTP Authentication: MAC Access Authentication (draft 00)
# author: Justas Janauskas,
# Aug 5, 2012
#
# This example calculates request MAC according to "HTTP Authentication: MAC Access Authentication (draft 00)"
# example in section 1.2
#
# ref: http://tools.ietf.org/pdf/draft-ietf-oauth-v2-http-mac-00.pdf
require 'base64'
require 'openssl'
@jjanauskas
jjanauskas / draft-ietf-oauth-v2-http-mac-01-example.rb
Created August 5, 2012 10:15
This example calculates request MAC according to "HTTP Authentication: MAC Access Authentication (draft 01)"
# author: Justas Janauskas,
# Aug 5, 2012
#
# Where is mistake?
#
# This example calculates request MAC according to "HTTP Authentication: MAC Access Authentication (draft 01)"
# example in section 1.1
#
# ref: http://tools.ietf.org/pdf/draft-ietf-oauth-v2-http-mac-01.pdf