npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@maccuaa/intellitrust-auth-sdk

v5.44.0

Published

TypeScript SDK client for Entrust Identity as a Service Authentication API

Downloads

445

Readme

@maccuaa/intellitrust-auth-sdk

NPM Version NPM Downloads

TypeScript SDK for the Entrust Identity as a Service (IDaaS) Authentication API.

Note: This is an unofficial community-maintained SDK, not an official Entrust product.

Features

  • 🎯 Fully Typed: Complete TypeScript definitions for all API operations
  • 🚀 Modern ESM: Built for modern JavaScript environments
  • 📦 Tree-shakeable: Import only the functions you need
  • 🔒 Type-safe: Discriminated union types for response handling
  • 🪶 Lightweight: Minimal runtime dependencies

Installation

npm install @maccuaa/intellitrust-auth-sdk
bun add @maccuaa/intellitrust-auth-sdk

Quick Start

import {
  userChallengeUsingPost,
  userAuthenticateUsingPost,
} from "@maccuaa/intellitrust-auth-sdk";

const baseUrl = "https://customer.region.trustedauth.com";

// Step 1: Request authentication challenge
const challengeResponse = await userChallengeUsingPost(
  {
    authenticator: "TOKEN",
    userChallengeParameters: {
      userId: "john.doe",
      applicationId: "app-id",
    },
  },
  { baseUrl }
);

if (challengeResponse.status === 200) {
  const authToken = challengeResponse.data.token;

  // Step 2: Complete authentication with OTP
  const authResponse = await userAuthenticateUsingPost(
    {
      authenticator: "TOKEN",
      authorization: authToken,
      userAuthenticateParameters: {
        userId: "john.doe",
        applicationId: "app-id",
        response: "123456", // OTP code
      },
    },
    { baseUrl }
  );

  if (
    authResponse.status === 200 &&
    authResponse.data.authenticationCompleted
  ) {
    console.log("Authentication successful!");
  }
}

Response Handling

The SDK uses discriminated union types for type-safe response handling:

const response = await userAuthenticatorQueryUsingPost(
  {
    userAuthenticateQueryParameters: {
      userId: "john.doe",
      applicationId: "app-id",
    },
  },
  { baseUrl }
);

// Type guard with status check
if (response.status === 200) {
  // response.data is now typed as UserAuthenticateQueryResponse
  console.log("User authenticators:", response.data.authenticators);
} else if (response.status === 404) {
  // response.data is now typed as ErrorInfo
  console.log("Error:", response.data.errorMessage);
}

Configuration

Global Defaults

Set default options for all requests:

import { defaults } from "@maccuaa/intellitrust-auth-sdk";

defaults.baseUrl = "https://customer.region.trustedauth.com";

// Now you can call functions without specifying baseUrl each time
const response = await userAuthenticatorQueryUsingPost({
  userAuthenticateQueryParameters: {
    userId: "john.doe",
    applicationId: "app-id",
  },
});

Per-Request Options

Override defaults for individual requests:

const response = await userAuthenticateUsingPost(
  {
    authenticator: "PASSWORD",
    userAuthenticateParameters: {
      userId: "john.doe",
      applicationId: "app-id",
      response: "password123",
    },
  },
  {
    baseUrl: "https://different.trustedauth.com",
    headers: { "Custom-Header": "value" },
  }
);

Authentication Flows

Token (OTP) Authentication

import {
  userChallengeUsingPost,
  userAuthenticateUsingPost,
} from "@maccuaa/intellitrust-auth-sdk";

// Request challenge
const challenge = await userChallengeUsingPost(
  {
    authenticator: "TOKEN",
    userChallengeParameters: {
      userId: "[email protected]",
      applicationId: "app-id",
    },
  },
  { baseUrl }
);

if (challenge.status === 200) {
  // Complete authentication with OTP
  const auth = await userAuthenticateUsingPost(
    {
      authenticator: "TOKEN",
      authorization: challenge.data.token,
      userAuthenticateParameters: {
        userId: "[email protected]",
        applicationId: "app-id",
        response: "123456",
      },
    },
    { baseUrl }
  );
}

Password Authentication

const response = await userAuthenticateUsingPost(
  {
    authenticator: "PASSWORD",
    userAuthenticateParameters: {
      userId: "[email protected]",
      applicationId: "app-id",
      response: "securePassword123",
    },
  },
  { baseUrl }
);

if (response.status === 200 && response.data.authenticationCompleted) {
  console.log("Login successful");
}

FIDO Authentication

import {
  userChallengeUsingPost,
  userAuthenticateUsingPost,
} from "@maccuaa/intellitrust-auth-sdk";

// Request FIDO challenge
const challenge = await userChallengeUsingPost(
  {
    authenticator: "FIDO",
    userChallengeParameters: {
      userId: "[email protected]",
      applicationId: "app-id",
    },
  },
  { baseUrl }
);

if (challenge.status === 200 && challenge.data.fido) {
  // Process FIDO challenge and get credential response
  const fidoResponse = {
    authenticatorData: "...",
    clientDataJSON: "...",
    credentialId: "...",
    signature: "...",
  };

  // Complete FIDO authentication
  const auth = await userAuthenticateUsingPost(
    {
      authenticator: "FIDO",
      authorization: challenge.data.token,
      userAuthenticateParameters: {
        userId: "[email protected]",
        applicationId: "app-id",
        fido: fidoResponse,
      },
    },
    { baseUrl }
  );
}

Query Available Authenticators

import { userAuthenticatorQueryUsingPost } from "@maccuaa/intellitrust-auth-sdk";

const response = await userAuthenticatorQueryUsingPost(
  {
    userAuthenticateQueryParameters: {
      userId: "[email protected]",
      applicationId: "app-id",
    },
  },
  { baseUrl }
);

if (response.status === 200) {
  console.log("Available authenticators:", response.data.authenticators);
}

FIDO Token Management

Register FIDO Token

import {
  startFidoRegisterUsingGet,
  completeFidoRegisterUsingPost,
} from "@maccuaa/intellitrust-auth-sdk";

// Start FIDO registration
const startResponse = await startFidoRegisterUsingGet({ baseUrl });

if (startResponse.status === 200) {
  const challenge = startResponse.data;

  // Process challenge with WebAuthn API and get credential
  const credential = {
    attestationObject: "...",
    clientDataJSON: "...",
  };

  // Complete registration
  const completeResponse = await completeFidoRegisterUsingPost(
    {
      fidoRegisterResponse: credential,
    },
    { baseUrl }
  );

  if (completeResponse.status === 200) {
    console.log("FIDO token registered:", completeResponse.data);
  }
}

Manage FIDO Tokens

import {
  getSelfFidoTokenUsingGet,
  updateSelfFidoTokenUsingPut,
  deleteSelfFidoTokenUsingDelete,
} from "@maccuaa/intellitrust-auth-sdk";

// Get token details
const token = await getSelfFidoTokenUsingGet(
  { tokenid: "token-id" },
  { baseUrl }
);

// Update token
await updateSelfFidoTokenUsingPut(
  {
    tokenid: "token-id",
    fidoTokenParms: { label: "My Security Key" },
  },
  { baseUrl }
);

// Delete token
await deleteSelfFidoTokenUsingDelete({ tokenid: "token-id" }, { baseUrl });

Supported Authenticators

  • PASSWORD - Password authentication
  • TOKEN - OTP tokens (soft tokens, hardware tokens)
  • FIDO - FIDO/WebAuthn
  • PASSKEY - Passkeys
  • MACHINE - Device authentication
  • GRID - Grid card authentication
  • KBA - Knowledge-based authentication
  • OTP - One-time passwords
  • EXTERNAL - External identity provider
  • IDP - Identity provider
  • USER_CERTIFICATE - Certificate-based authentication
  • And more...

API Documentation

For detailed API documentation, refer to the official Entrust IDaaS Authentication API documentation.

Requirements

  • Node.js >= 22.12.0
  • TypeScript >= 5.0 (for TypeScript projects)

License

ISC

Support

This is a community-maintained SDK. For issues or feature requests, please visit the GitHub repository.

For official Entrust IDaaS support, contact Entrust directly.