ProctorU OmniAuth Strategy
This gem provides the OmniAuth strategy for the ProctorU API.
Installation
Add this line to your application's Gemfile:
$ gem 'omniauth-proctoru'
And then execute:
$ bundle
Or install it yourself as:
$ gem install omniauth-proctoru
Usage
You'll need to register your app with ProctorU. Please email [email protected] to do so.
Using this gem is similar to other OmniAuth strategies for Ruby on Rails.
Add your app credentials to config/initializers/omniauth.rb:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :proctoru, ENV['proctoru_key'], ENV['proctoru_secret']
end
Or with Devise in config/initializers/devise.rb:
config.omniauth :proctoru, ENV['proctoru_key'], ENV['proctoru_secret']
Auth Hash Schema
Here's an example auth hash, available in request.env['omniauth.auth']:
{
"provider": "proctoru",
"uuid": "A48932KEJNELOIIUQANS4343243",
"info": {
"uuid":"295DC739BEDA4BB8E050960A380358BC",
"email": "[email protected]"
"name": "Woodward Procki",
"image_url": "https://pbs.twimg.com/profile_images/3188361433/e821da4ec8d93c0a1b3e0461149da300_400x400.jpeg"
},
"extra": {
"raw_info": {
"me": {
"email": "[email protected]",
"first_name": "Woodward",
"last_name": "Procki",
"phone_home": "12345654321",
"phone_mobile": "0987654321",
"phone_work": "1234567890",
"street1": "123 Owl Lane",
"street2": "",
"city": "New York City",
"state": "NY",
"zip": "12345",
"country": "US",
"uuid": "A48932KEJNELOIIUQANS4343243",
"image_url": "https://pbs.twimg.com/profile_images/3188361433/e821da4ec8d93c0a1b3e0461149da300_400x400.jpeg"
}
}
}
}
More
This gem is brought to you by the ProctorU development team. Please reach out to us if you have any questions.
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 a new Pull Request