2010-08-10 16:04:19 -04:00
= OmniAuth::Enterprise
2010-07-04 15:42:09 -04:00
OmniAuth strategies for use in your intranet.
== Installation
2010-08-10 16:04:19 -04:00
To get just enterprise functionality:
2010-07-04 15:42:09 -04:00
2010-08-10 16:04:19 -04:00
gem install oa-enterprise
2010-07-04 15:42:09 -04:00
For the full auth suite:
gem install omniauth
2010-10-02 22:58:14 -04:00
CAS strategy
2010-07-04 15:42:09 -04:00
== Stand-Alone Example
Use the strategy as a middleware in your application:
2010-08-10 16:04:19 -04:00
require 'omniauth/enterprise'
2010-07-04 15:42:09 -04:00
use OmniAuth::Strategies::CAS, :server => 'http://cas.mycompany.com/cas'
Then simply direct users to '/auth/cas' to have them sign in via your company's CAS server.
See OmniAuth::Strategies::CAS::Configuration for more configuration options.
2010-10-01 22:03:47 -04:00
Then simply direct users to '/auth/cas' to have them sign in via your company's CAS server.
See OmniAuth::Strategies::CAS::Configuration for more configuration options.
2010-07-04 15:42:09 -04:00
== OmniAuth Builder
If CAS is one of several authentication strategies, use the OmniAuth Builder:
2010-08-10 16:04:19 -04:00
require 'omniauth/enterprise'
2010-07-04 15:42:09 -04:00
require 'omniauth/oauth' # for Campfire
require 'openid/store/filesystem'
use OmniAuth::Builder do
provider :cas, :server => 'http://cas.mycompany.com/cas'
provider :campfire
end
2010-10-01 22:03:47 -04:00
LDAP strategy
2010-10-02 22:58:14 -04:00
use OmniAuth::Strategies::LDAP, :host => '10.101.10.1', :port => 389, :method => :plain, :base => 'dc=intridea, dc=com', :uid => 'sAMAccountName', :try_sasl => true, :sasl_mechanisms => "GSS-SPNEGO"
2010-10-01 22:03:47 -04:00
or
use OmniAuth::Builder do
2010-10-02 22:58:14 -04:00
provider :LDAP, :host => '10.101.10.1', :port => 389, :method => :plain, :base => 'dc=intridea, dc=com', :uid => 'sAMAccountName', :try_sasl => true, :sasl_mechanisms => "GSS-SPNEGO"
2010-10-01 22:03:47 -04:00
end
LDAP server's :host and :port are required, :method is also a required field, and allowed values are :plain, :ssl, and :tls.
2010-10-02 22:58:14 -04:00
:base is required, it is the distinguish name (DN) for your organization, all users should be searchable under this base.
:uid is required, it is the LDAP attribute name for the user name in the login form. typically AD would be 'sAMAccountName' or 'UniquePersonalIdentifier', while
OpenLDAP is 'uid'. You can also use 'dn', if your user choose the put in the dn in the login form (but usually is too long for user to remember or know).
2010-10-01 22:03:47 -04:00
:try_sasl and :sasl_mechanisms are optional, use it to initial SASL connection to server. mechanism supported are DIGEST-MD5 and GSS-SPNEGO.
Then simply direct users to '/auth/ldap' to have them authenticated via your company's LDAP server.