Omniauth::Eventful
This gem is an OmniAuth Strategy for the Eventful API. Eventful uses OAuth 1.0, you can read about their authentication process here:
Installation
Add this line to your application's Gemfile:
gem 'omniauth-eventful'
And then execute:
$ bundle
Or install it yourself as:
$ gem install omniauth-eventful
Usage
Tell OmniAuth about this provider. For a Rails app, your config/initializers/omniauth.rb file should look like this:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :eventful, "CONSUMER_KEY", "CONSUMER_SECRET", "APP_KEY"
end
Replace "CONSUMER_KEY", "CONSUMER_SECRET" and "APP_KEY" with the appropriate values you obtain from Requesting an App Key.
Make sure to set a route in your config/routes.rb file to handle the callback. For example:
get '/auth/:provider/callback', to: 'sessions#create'
Then, access the returned data in your Sessions Controller. For example:
omniauth_hash = request.env['omniauth.auth'].to_hash
name = omniauth['info']['name']
See an example of the Auth Hash available in request.env['omniauth.auth'] at:
To see the output parameters for the Eventful User check out:
Contributing
- Fork it ( http://github.com//omniauth-eventful/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request