Update oauth.rb: add some methods