Project

crowd_rest

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby client for Atlassian's Crowd REST API. Word up.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 1.0

Runtime

~> 0.13.0
 Project Readme

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"

We use semantic versioning. You should too.