Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby client for Atlassian's Crowd REST API.

tag: v0.0.1

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 crowd_rest.gemspec
README.md

Crowd Rest

A ruby client for Atlassian's Crowd REST API.

Installation

gem install crowd_rest

Usage

require 'crowd_rest'

CrowdRest.config do |c|
  c.crowd_url = "http://127.0.0.1:8095"
  c.app_name = "demo"
  c.app_pass = "demo_pass"
end

# unsuccessful login
response = CrowdRest::Session.create("baduser", "badpass")
response.code # => 400
response.reason # => INVALID_USER_AUTHENTICATION

# successful log in
response = CrowdRest::Session.create("gooduser", "goodpass")
response.code # => 201
token = response.token # => the crowd sso token

# check for existing login session
response = CrowdRest::Session.find(token)
response.code # => 200

# get the user associated with a login session
response = CrowdRest::Session.find(token, :include => :user)
response.user['name'] # => "gooduser"
Something went wrong with that request. Please try again.