Sha256: 14e7ee101a59b03c3562dd8273c559b81ff715799c0fae3ec97189f4bd929d27
Contents?: true
Size: 1.75 KB
Versions: 3
Compression:
Stored size: 1.75 KB
Contents
# OmniAuth Cronofy OAuth2 Strategy Strategy to authenticate with Cronofy via OAuth2 in OmniAuth. Get your API accesss at: http://www.cronofy.com/developers ## Installation Add this line to your application's Gemfile: ```ruby gem 'omniauth-cronofy' ``` And then execute: $ bundle Or install it yourself as: $ gem install omniauth-cronofy ## Usage Here's an example for adding the middleware to a Rails app in `config/initializers/omniauth.rb`: ```ruby Rails.application.config.middleware.use OmniAuth::Builder do provider :cronofy, ENV["CRONOFY_CLIENT_ID"], ENV["CRONOFY_CLIENT_SECRET"], { scope: "read_account list_calendars create_event" } end ``` Then to auth with Cronofy you would navigate to `/auth/cronofy` ## Configuration Configurable options * `scope`: A space-separated list of permissions you want to request from the user. See the [API Authorization documentation](http://www.cronofy.com/developers/api#authorization) for a full list of available permissions. ## Auth Hash ```ruby { :provider => "cronofy", :uid => "acc_382374827234", :info => { :email => "jo@company.com", :name => "Jo Smith" }, :credentials => { :token => "token", :refresh_token => "another_token", :expires_at => 1424884727, :expires => true }, :extra => { :raw_info => { :account_id = "acc_9324872847", :email => "jo@company.com", :name => "Jo Smith" } } } ``` ## Contributing 1. Fork it ( https://github.com/[my-github-username]/omniauth-cronofy/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
omniauth-cronofy-0.4.0 | README.md |
omniauth-cronofy-0.3.0 | README.md |
omniauth-cronofy-0.2.1 | README.md |