Rubius: A simple native Ruby RADIUS authentication gem
Rubius provides a simple interface to RADIUS authentication
Requirements
-
Ruby >= 1.9.2 (not tested with previous versions)
-
Rails >= 3.0.6 (not tested with previous versions)
Rubius works with the following RADIUS servers:
-
FreeRADIUS 1.1.8
Installation
Include the gem in your Gemfile:
gem “rubius”
And then run bundler:
$ bundle install
Or install using rubygems
$ gem install rubius You can then use it in your programs:
require ‘rubius’
Another way would be to clone the git repository
$ git clone git://github.com/rahvin/rubius.git
And then install the gem
$ cd rubius $ rake install
Quick Start
$ cd /my/rails/app $ rails generate rubius:install
This will create an initial ‘config/rubius.yml’ configuration file and a ‘config/radius-dictionary’ RADIUS dictionary file, it will also create an initializer in ‘config/initializers/rubius.rb’ to load Rubius when your application starts up.
Now configure your RADIUS server properties in ‘config/rubius.yml’. When you’re done, you can authenticate with:
if Rubius::Authenticator.authenticate(‘username’, ‘password’) # woohoo end
Contributing to Rubius
-
Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet
-
Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it
-
Fork the project
-
Start a feature/bugfix branch
-
Commit and push until you are happy with your contribution
-
Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright
Copyright © 2011 Ralph Rooding. See LICENSE.txt for further details.