Official OmniAuth strategy for authenticating with LayerVault. You will need to register your application first.
Install the gem or add it to your Gemfile.
gem install omniauth-layervault
You will need to configure the strategy as middleware.
Rack
use OmniAuth::Builder do
provider :layervault, ENV['LAYERVAULT_KEY'], ENV['LAYERVAULT_SECRET']
end
Rails 3
Rails.application.config.middleware.use OmniAuth::Builder do
provider :layervault, ENV['LAYERVAULT_KEY'], ENV['LAYERVAULT_SECRET']
end
LayerVault supports various scopes to limit what actions your application can perform with the API. To specify which scopes to use:
use OmniAuth::Builder do
provider :layervault, ENV['LAYERVAULT_KEY'], ENV['LAYERVAULT_SECRET'], scope: "user+files"
end
Available Scopes
- user: default, basic user information
- files: read access to the user's files and folders
- write: write access to the user's files and folders
- 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