Ricoh Auth Client.
Add this line to your application's Gemfile:
gem 'ricohapi-auth'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ricohapi-auth
A working rails sample app using Ricoh Media Storage API is using this gem internally.
client = RicohAPI::Auth::Client.new(
'<your-client-id>',
'<your-client-secret>'
)
client.resource_owner_credentials = '<your-user-id>', '<your-password>'
api_session = client.api_token_for! RicohAPI::MStorage::SCOPE
puts api_session.access_token, api_session.refresh_token
The gem is available as open source under the terms of the MIT License.