I lost access to my crowd server awhile ago and things more or less stopped here, however I have had a handful of requets lately so I am going to restart this project when I get a few moments of free time.
Atlassian Crowd Client for node.js
A node.js module for interacting with the Atlassian Crowd.
Provides the ability to Add, Remove, and Manage Users and Groups as well as SSO functionality.
Getting Started
In order to use this module you will first need to configure an application in Atlassian Crowd and Configure the Remote IP Address.
See the Atlassian Crowd Documentation (Adding an Application) for assistance.
Usage
var AtlassianCrowd = ; var options = "crowd": "base": "http://localhost:8059/crowd/" "application": "name": "my application" "password": "pass123" var crowd = options;
Options
If you do not know these please ask your systems administrator.
crowd.base
Atlassian Crowd Base URL
application.name
Application name as configured in Atlassian Crowd
application.password
Application name as configured in Atlassian Crowd
API
Testing Configuration and Connectivity
A simple function to check connectivity to Atlassian Crowd.
ping(callback)
- callback Function (err, res)
crowd;
Search Users or Groups
Uses the Crowd Query Language
See Crowd Query Language Documenation for more details
search(entityType, query, callback)
- entityType String 'user' or 'group'
- query String Crowd Query
Search Users
crowd;
Search Groups
crowd;
User Related Functions
Here you can find utilities for Managing, Creating, Removing, Users as well as Changing Passwords, and Basic Authentication (NON SSO).
Finding a User by Username
user.find(userrname, callback)
- username String
- callback Function (err, res)
crowduser;
Checking if User is Active
user.active(username, callback)
- username String
- callback Function (err, res)
crowduser;
Creating a User
user.create(firstname, lastname, displayname, email, username, password, callback)
- firstname String
- lastname String
- displayname String
- email String
- username String
- password String
- callback Function (err)
crowduser;
Removing a User
user.remove(username, callback)
- username String
- callback Function (err)
crowduser;
List a Users Group Membership
user.groups(username, callback)
- username String
- callback Function (err, res)
crowduser;
List a Users Attributes
user.attributes(username, callback)
- username String
- callback Function (err, res)
crowduserattributes'testuser' { iferr throw err; else console; };
Set a New Attribute to a User
user.setAttributes(username, name, values, callback)
- username String
- name String
- values String or Array
- callback Function (err, res)
crowduser;
Remove an Attribute From a User
user.removeAttribute(username, name, values, callback)
- username String
- name String
- callback Function (err, res)
crowduserattributes'testuser' 'attributeName' 'attributeValue' { iferr throw err; else console; };
User Authentication (NON SSO)
user.authenticate(username, password, callback)
- username String
- password String
- callback Function (err, res)
crowduser;
Changing a Users Password
user.changepassword(username, newpassword)
- username String
- newpassword String
- callback Function (err)
crowduser;
Group Functions
Here you can find utilities for Managing, Creating, and Removing Groups.
Finding a Group
groups.find(groupname, callback)
- groupname String
- callback Function (err, res)
crowdgroups;
Creating a Group
groups.create(name, description, callback)
- name String
- description String
- callback Function (err)
crowdgroups;
Removing a Group
groups.remove(name, callback)
- name String
- callback Function (err)
crowdgroups
Adding a User to a Group
groups.addmember(username, group, callback)
- username String
- group String
- callback Function (err)
crowdgroups;
Removing a User from a Group
groups.removemember(username, group, callback)
- username String
- group String
- callback Function (err)
crowdgroups;
Find the Direct Members of a Group
groups.directmembers(groupname, callback)
- groupname String
- callback Function (err, res)
crowdgroups;
Find the Nested Members of a Group
groups.nestedmembers(groupname, callback)
- groupname String
- callback Function (err, res)
crowdgroups;
Session Functions
Provides SSO Functionality
Create a new Session
session.create(username, password, callback)
- username String
- password String
- remote_addr String (optional)
- callback Function (err, res)
crowdsession;
Authenticate
session.authenticate(token, remote_addr, callback)
- token String
- remote_addr String (optional)
- callback Function (err, res)
crowdsession;
Destroy
session.destroy(token, callback)
- token String
- callback Function (err)
crowdsession;
TODO
- Update User Profile