Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@asymmetrik/crowd-authenticator

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asymmetrik/crowd-authenticator

Pluggable Crowd authenticator

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

@asymmetrik/crowd-authenticator

Build Status Code Climate Test Coverage standard-readme compliant

Authenticator for creating sessions with Atlassian Crowd. The authenticator wraps the logic necessary to sync Crowd with an external authentication system.

Table of Contents

Install

Include this module as a dependency of your application in the package.json file. For example:

{
  ...
  dependencies: {
    "@asymmetrik/crowd-authenticator": "latest"
  }
  ...
}

Usage

Include the module via require wherever applicable:

let CrowdAuthenticator = require('@asymmetrik/crowd-authenticator');
let CrowdClient = require('atlassian-crowd-client');

// Create the crowd client
let crowdClient = new CrowdClient({
	baseUrl: 'http://localhost:8095/crowd/',
	application: {
		name: 'crowd-authenticator',
		password: 'password'
	}
});

// Create a custom config
let config = {
	passwordStrategy: () => { return Promise.resolve('password'); },
	groupPrefix: 'prefix:',
	defaultGroups: [ 'jira-user', 'confluence-user' ]
};

// Create the authenticator instance
let crowdAuthenticator = CrowdAuthenticator(crowdClient, config);

let userInfo = {
	firstname: 'Test',
	lastname: 'User',
	displayname: 'Test User',
	email: 'test@email.com',
	username: authId,
	groups: [ 'one', 'two' ]
};

// Authenticate
crowdAuthenticator.authenticate(userInfo)
	.then((session) => {
		// session contains token and expiration information
		// at this point, crowd will contain the defaultGroups plus all groups on the userInfo
	);

API

See above Usage example.

Contribute

PRs accepted.

License

See LICENSE for details

FAQs

Package last updated on 07 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc