Reviewed::Auth
A Central Authentication Service (CAS) for Reviewed (Next) applications. The service can be run as a stand alone application or mounted to a Rails or Sinatra application.
Installation
Add this line to your application's Gemfile:
gem 'reviewed-auth', github: "reviewed/reviewed-auth"
And then execute:
$ bundle
Usage
Rails 3.x
To mount the CAS to a Rails application add the following route to routes.rb:
mount Reviewed::Auth::LoginController => "/auth"
Configuration
- api_host_path : REQUIRED. You must set this to the URL of The Guide.
Reviewed::Auth.api_host_path = "https://api.reviewed.com/api/v1" - drop_cookie : Defaults to
false. If set totruethis will drop a cookie named_reviewed_tokenwith the user's API token as it's value. This can be passed as a query parameter or set usingReviewed::Auth.drop_cookie = true. - return_url : Defaults to
/. This can be passed as a query parameter or set usingReviewed::Auth.return_url = 'http://www.example.com'. If thedrop_cookiesetting is set tofalsethe parameter of_reviewed_tokenwill be appended to thereturn_urlvalue when the redirect occurs.
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 new Pull Request