OmniAuth RealGravity  Gem Version

This gem provides an OmniAuth strategy for authenticating with RealGravity. ~~You will need to register an app to get your application key and secret.~~ Note: RealGravity OAuth support is currently being privately tested. It may be available publicly in the near future.

Usage

Add the RealGravity OmniAuth strategy to your Gemfile:

gem "omniauth-realgravity", "~> 0.1.2"

In a Rails app, configure the middleware in config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :realgravity, ENV['REALGRAVITY_KEY'], ENV['REALGRAVITY_SECRET']
end

Or in a rack-based app, like Sinatra:

require 'sinatra'
require 'omniauth'

use Rack::Session::Cookie
use OmniAuth::Builder do
  provider :realgravity, ENV['REALGRAVITY_KEY'], ENV['REALGRAVITY_SECRET']
end

Visiting /auth/realgravity will kick off the authentication flow, and will require your app to provide the /auth/:provider/callback endpoint to complete the handshake. Read more here.

Example Auth Hash

After the OmniAuth callback is successfully reached, env['omniauth.auth'] will provide the following data:

{
  "provider":"realgravity",
  "uid":830,
  "info":{
    "name":"Chris Caselas",
    "email":"[email protected]",
    "network_id":121,
    "company_id":22,
  },
  "credentials":{
    "token":"RR6wG1021ttKNLe0WFpqR4ESYZcH",
    "expires":false
  }
}

License (MIT)

Copyright (c) 2013 Chris Caselas and RealGravity

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.