Skip to content

dpisarewski/crowd_authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Put into your Gemfile:

gem "crowd_authentication", :git => "git://github.com/dpisarewski/crowd_authentication.git"

Usage

  1. Add your host to remote hosts list in crowd applications http://www.arvatosystems-us.com/crowd/console/secure/application/browse.action

  2. Copy config/crowd_authentication.yml file into the rails config directory and set up the credentials for your application.

  3. If you are using Rails 2 you have to

include CrowdAuthentication::Controller

in your ApplicationController.

Use

authenticate_with_crowd_id(crowd_id, password)

in your controllers for authentication. This method returns a hash with response code and response body in JSON format.

{:success => true, :code => 200, :body => body_hash}
crowd_user_data(crowd_id)

returns a Hash with user data.

For example:

{"expand"=>"attributes",
 "link"=>
  {"href"=>
    "",
   "rel"=>"self"},
 "name"=>"[email protected]",
 "first-name"=>"Dieter",
 "last-name"=>"Pisarewski",
 "display-name"=>"Dieter Pisarewski",
 "email"=>"[email protected]",
 "password"=>
  {"link"=>
    {"href"=>
      "",
     "rel"=>"edit"}},
 "active"=>true,
 "attributes"=>
  {"attributes"=>[],
   "link"=>
    {"href"=>
      "",
     "rel"=>"self"}}}

About

gem for authentication with Atlassian Crowd

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages