Omniauth::Hipchat
This Gem contains the HipChat strategy for OmniAuth.
Before You Begin
You should have already installed OmniAuth into your app; if not, read the OmniAuth README to get started.
Now read documentation about HipChat integrations and create an application. Take note of your API keys.
Using This Strategy
First start by adding this gem to your Gemfile:
gem 'omniauth-hipchat'
If you need to use the latest HEAD version, you can do so with:
gem 'omniauth-hipchat', github: 'pinoss/omniauth-hipchat'
Next, 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 :hipchat, "API_KEY", "API_SECRET", scope: "view_group admin_group"
end
Replace "API_KEY"
and "API_SECRET"
with the appropriate values you obtained earlier.
If you are using Devise then it will look like this:
Devise.setup do |config|
# other stuff...
config.omniauth :hipchat, ENV["HIPCHAT_APP_ID"], ENV["HIPCHAT_APP_SECRET"], scope: 'view_group admin_group'
# other stuff...
end
HipChat lets you combine and choose from a few different scopes.
Contributing
- Fork it
- 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
Special Thanks
Many thanks to the omniauth-slack and omniauth-reddit contributors. This strategy was inspired by Omniauth Slack and Reddit strategies.