This is the unofficial OmniAuth strategy for authenticating to Cloud 66.
Before you can start developing your API client for Cloud 66, you need to enable developers mode on your account.
Login to your Cloud 66 account and enable your account as a Developer account under Account/Apps. Once your account is a developer one, you will see a Developers link on the left menu.
Now you can register your API client. Click on New Application button and enter the name of your client and the OAuth 2.0 callback URL.
For more info visit Cloud 66 official docs.
Add the strategy to your Gemfile
:
gem 'omniauth-cloud66'
Then integrate the strategy into your middleware:
use OmniAuth::Builder do
provider :cloud66, ENV['CLIENT_ID'], ENV['CLIENT_SECRET'], scope: "public redeploy"
end
In Rails, you'll want to add to the middleware stack:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :cloud66, ENV['CLIENT_ID'], ENV['CLIENT_SECRET'], scope: "public redeploy"
end
- The scope needs to be separated by space and not comma: "public redeploy" instead of "public,redeploy" !
For additional information, refer to the OmniAuth wiki.
See the example Sinatra app for full examples
Note: before running example app, please add your applicaation id and secret to example/config.ru
file.
omniauth-cloud66 is released under the MIT License. Developed by Aleksandar Diklic.