This is the official Ruby OmniAuth strategy for authenticating to Camdram.
Before you can start developing your API client for Camdram, you need to create an application and copy the application ID and secret key.
Add the strategy to your Gemfile
:
gem 'omniauth-camdram'
And then run bundle install
.
You can integrate the strategy into your middleware in a config.ru
:
use OmniAuth::Builder do
provider :camdram, ENV['CAMDRAM_APP_ID'], ENV['CAMDRAM_APP_SECRET'], scope: "user_shows user_orgs user_email write write_org"
end
If you're using Rails, you'll want to add to the middleware stack:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :camdram, ENV['CAMDRAM_APP_ID'], ENV['CAMDRAM_APP_SECRET'], scope: "user_shows user_orgs user_email write write_org"
end
You can see a description of the different types of scope on the Camdram repository.
For additional information, please refer to the OmniAuth wiki.
See the example Sinatra app for full examples.
The code in this Git repository is released under the MIT License.
Copyright (c) 2018-2019 Members of the Camdram Web Team and other contributors.