This gem is an implementation of an OAuth2 Authorization Server.
It is designed to work as a standalone server, as a mountable Rack Endpoint in a rails app, or as a middleware by leveraging Sinatra.
Add this line to your application's Gemfile:
gem 'oauth2-server'
And then execute:
$ bundle
Or install it yourself as:
$ gem install oauth2-server
You can just run this server against a local database to experiment with your oauth endpoint before integrating into your app, or just to be used as a standalone auth server against a production system.
createdb oauth-server
bundle exec sequel -m db/migrations postgres://localhost/oauth-server
echo 'OAUTH2_DB_URL=postgres://localhost/oauth-server' > .env
gem install foreman
gem install bundler
bundle install
formean start
export OAUTH2_DB_URL=postgres://localhost/oauth-server
bundle exec rake boostrap
$ bundle exec rake do_it_live
Auth Url: http://localhost:5000/authorize?response_type=code&client_id=client_id&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Foauth%2Fcallback
Auth Code: 5106a892-3b43-48f2-8841-ae0198ec00db
Auth Token: 6c7c0af3-9158-45bb-b61c-457da066cd08
createdb oauth-server-test
gem install bundler
bundle install
bundle exec rake
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request