-
Notifications
You must be signed in to change notification settings - Fork 21
Home
omniauth_crowd integrates Atlassian Crowd with OmniAuth to allow Rack-based applications (e.g. Rails, Sinatra) to use Crowd as an authentication source. It is designed to work with OmniAuth 1.0.0.
In file Gemfile
gem 'omniauth_crowd', :require=>"omniauth/crowd"
In file config/initializers/omniauth.rb
Rails.application.config.middleware.use OmniAuth::Builder do
provider :crowd, :crowd_server_url=>"https://YOUR_CROWD_SERVER",
:application_name=>"YOUR_CROWD_APPLICATION",
:application_password=>"YOUR_CROWD_APPLICATION_PASSWORD"
end
Atlassian Crowd is an identity management and Single Sign On (SSO) platform. It is used by companies to create a single source of identity management that integrates LDAP, custom logins, etc. across an enterprise. Since v2.0, Crowd supplies a REST API that allows for validation of user name, passwords, and returns profile information.
OmniAuth is a framework for Rack-based applications (like Rails and Sinatra) to authenticate the identity of users using third-party frameworks.
This gem forms the bridge between these two services to allow for Crowd to be used by Rack applications that rely on OmniAuth for authentication.
You will need to have a user with a unique identity that we are authorizing for. I recommend using Devise, it is the hotness in identity management. Other options include authlogic, restful_authentication, roll your own, etc.
Details on setting up OmniAuth with your authentication system is out of scope here.
For our purposes, we will assume that you are using Devise for your Rack application authentication. For more details, check out the devise wiki and the Devise OmniAuth Example to see how to get Devise and OmniAuth integrated.
You need to get OmniAuth working with your identity management system first before you attempt to use Crowd (or any other third party service).
Follow the instructions in Crowd's documentation for Adding an Application. When doing this, remember the application name and password. We will need these later
In file Gemfile
gem 'omniauth_crowd', :require=>"omniauth/crowd"
This will download the Gem and require appropriately
In file config/initializers/omniauth.rb
Rails.application.config.middleware.use OmniAuth::Builder do
provider :crowd,
:crowd_server_url=>"https://YOUR_CROWD_SERVER",
:application_name=>"YOUR_CROWD_APPLICATION",
:application_password=>"YOUR_CROWD_APPLICATION_PASSWORD"
end
Login with Crowd!