@jenius2/j2-forgerock
A node module for ForgeRock requests
Last updated 2 years ago by feizal .
UNLICENSED · Repository · Original npm · Tarball · package.json
$ cnpm install @jenius2/j2-forgerock 
SYNC missed versions from official npm registry.

???? build status

Description

node-j2-forgerock is a module used to abstract the logic and HTTP call chains behind communicating with the IDM Platform ForgeRock. It can be used in a similar way to an SDK, hiding away the complexities of ForgeRock.

Requirements

Engine: Node 8.5.0

Table of Contents

Install

npm install --save @jenius2/node-j2-forgerock

Usage

const { ForgeRockConnector } = require('@jenius2/j2-forgerock');

const forgeRockConnector = new ForgeRockConnector(opts); // See below for options

const tokens = await forgeRockConnector.auth.authenticateWithPassword({ email, password, scope });

Developer Guide

ForgeRock is a complicated beast to deal with, with many straightforward functionalities involving multiple calls, swapping tokens and templates in order to get the final result (typically a set of oauth tokens)

To abstract away this complexity, the SDK currently contains the following methods as an SDK of sorts:

Initial configuration

const forgeRockConnector = new ForgeRockConnector(opts);

opts should be in the format:

opts:{
  logger,
  session, // Session Provider class with `createHeader` and `save` methods
  config: {
    privilegeOAuth: {
      clientId,
      clientSecret
    },
    permanentOAuth: {
      clientId,
      clientSecret
    },
    temporaryOAuth: {
      clientId
      clientSecret
    },
    adminOAuth: {
      clientId
      clientSecret
    }
  },
  openAmHttpConnector,  // HTTP connector with defaults to Open AM
  openIdmHttpConnector  // HTTP connector with defaults to Open IDM
}

User Type

The UserType constant is used to differentiate between PERMANENT and TEMPORARY users, both of which call different parts of ForgeRock to complete transactions. e.g.

const { constants: { UserType } } = require('@jenius2/j2-forgerock');

return await forgerockConnector.auth.refreshTokens({ token, UserType.PERMANENT });

Features

The SDK is organised around core features of IDM:

  • Auth
    • Authentication methods, including logging in with password and refreshing tokens
  • Device
    • Registering a new device, listing devices etc
  • Forgot Password
    • Methods to enable the Forgot Password user journey
  • Profile
    • Query profiles by cashtag, update profile etc
  • Registration
    • Methods to complete the Registration user journey

Current Tags

  • 3.0.0-3                                ...           beta (2 years ago)
  • 3.6.3                                ...           latest (2 years ago)
  • 3.5.3-beta.0                                ...           prerelease (2 years ago)

45 Versions

  • 3.6.3                                ...           2 years ago
  • 3.6.2                                ...           2 years ago
  • 3.6.1                                ...           2 years ago
  • 3.6.0                                ...           2 years ago
  • 3.5.3-beta.0                                ...           2 years ago
  • 3.5.2                                ...           2 years ago
  • 3.5.2-beta.0                                ...           2 years ago
  • 3.5.1                                ...           2 years ago
  • 3.5.0                                ...           2 years ago
  • 3.4.0                                ...           2 years ago
  • 3.3.5                                ...           2 years ago
  • 3.3.2                                ...           2 years ago
  • 3.3.1                                ...           2 years ago
  • 3.3.0                                ...           2 years ago
  • 3.2.0                                ...           2 years ago
  • 3.1.1                                ...           2 years ago
  • 3.1.0                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 3.0.0-3                                ...           2 years ago
  • 3.0.0-2                                ...           2 years ago
  • 3.0.0-1                                ...           2 years ago
  • 2.2.1                                ...           2 years ago
  • 3.0.0-0                                ...           2 years ago
  • 2.2.0                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.4.3                                ...           2 years ago
  • 0.4.2                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.1                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago

Copyright 2014 - 2017 © taobao.org |