An OmniAuth strategy to allow you to authentication against Pluggable Authentication Modules (PAM).
omniauth-pam to your Gemfile, or:
gem install omniauth-pam
It has been tested under Ruby 1.9 and 2.0 on both Debian Wheezy (7.0) and Ubuntu
Precise (12.04). Ruby 1.8 can be made to work with small adjustments.
Under both Debian and Ubuntu you'll need the
libpam0g-dev package to compile the
Vagrantfile provides a Debian Wheezy environment and the
directory provides a working Sinatra example.
Simple Sinatra Example
But, getting it working is as simple as this:
require 'omniauth' require 'omniauth-pam' use Rack::Session::Cookie use OmniAuth::Strategies::PAM get '/auth/:provider/callback' do puts request.env['omniauth.auth'] end
Copyright (c) 2013 Nick Charlton and contributors. MIT Licensed.